This repository contains minimal packages to control the scout robot using ROS.
- scout_bringup: launch and configuration files to start ROS nodes
- scout_base: a ROS wrapper built around ugv_sdk developed by AgileX_Robotics (which is based on Weston_Robot) to monitor and control the scout robot
- scout_description: URDF model for the mobile base, a sample urdf is provided for customized robot with addtional sensors
- scout_msgs: scout related message definitions
-
Install dependent libraries
sudo apt install -y libasio-dev sudo apt install -y ros-$ROS_DISTRO-teleop-twist-keyboard
-
Clone the packages into your catkin workspace and compile
(the following instructions assume your catkin workspace is at: ~/scout_ws/src)
mkdir -p ~/scout_ws/src cd ~/scout_ws/src git clone https://github.com/HKPolyU-UAV/scout_ros.git cd .. catkin_make
-
Setup CAN-To-USB adapter (for message exchange between machine and car)
-
Enable gs_usb kernel module(If you have already added this module, you do not need to add it)
sudo modprobe gs_usb
-
Source the workspace
source ~/scout_ws/devel/setup.bash
-
first time use gh034-scout-ros package
rosrun scout_bringup setup_can2usb.bash
-
if not the first time use gh034-scout-ros package (Run this command every time you turn off the power)
rosrun scout_bringup bringup_can2usb.bash
-
Testing canbus command
# receiving data from can0 candump can0
- Launch ROS nodes
-
Start the base node for scout-mini
roslaunch scout_bringup scout_robot_base.launch
The scout_bringup/scout_mini_robot_base.launch has 5 parameters:
- port_name: specifies the port used to communicate with the robot, default = "can0"
- simulated_robot: indicates if launching with a simulation, default = "false"
- model_xacro: specifies the target ".xacro" file for the publishing of tf frames, default = scout_v2.xacro
- odom_topic_name: sets the name of the topic which calculated odometry is published to, defaults = "odom"
- is_scout_mini:Suitable for chassis of type scout_mini,defaults = "false"
-
Start the keyboard tele-op node
roslaunch scout_bringup scout_teleop_keyboard.launch
SAFETY PRECAUSION:
The default command values of the keyboard teleop node are high, make sure you decrease the speed commands before starting to control the robot with your keyboard! Have your remote controller ready to take over the control whenever necessary.
-
Install VRPN
sudo apt install -y ros-$ROS_DISTRO-vrpn sudo apt install -y ros-$ROS_DISTRO-vrpn-client-ros
-
Launch the VRPN sample.launch node
roslaunch vrpn_client_ros sample.launch
-
Check the position is correct from the VRPN node
rostopic echo /vrpn_client_node/gh034_car/pose or ${your_topic}
-
Check the mission file
The scout_base/src/utils/ugv_mission.hpp stores the mission waypoints of the FSM module.
-
Start the mission with scout_mini_vicon.launch
roslaunch scout_base scout_mini_vicon.launch
The scout_base/scout_mini_vicon.launch has 4 parameters:
- FSM_mission: determine using Finite state machine or not, default = "true"
- External_pos_setpoint: retrieve position commands from "/scout_wp/pose" , default = "false"
- MaxVelocity: Maximun forward velocity in meters per second, defult = "0.5"
- MaxTurnrate: Maximun turning rate in radius per second, defult = "1"
Using the robot with VIO
to be continued...