URDF model for Gazebo integrated with ROS.
We assume that you are working on Ubuntu 16.04 and already have installed ROS Kinetic. If not, follow the ROS install guide
Prepare the repository:
cd ~
mkdir ros_workspace
mkdir ros_workspace/src
cd ~/ros_workspace/src
catkin_init_workspace
cd ~/ros_workspace
catkin_make
Above commands should execute without any warnings or errors.
Clone this repository to your workspace:
cd ~/ros_workspace/src
git clone https://github.com/husarion/rosbot_description.git
Install depencencies:
cd ~/ros_workspace
rosdep install --from-paths src --ignore-src -r -y
Build the workspace:
cd ~/ros_workspace
catkin_make
From this moment you can use rosbot simulations. Please remember that each time, when you open new terminal window, you will need to load system variables:
source ~/ros_workspace/devel/setup.sh
In Terminal 1, launch the Gazebo simulation:
roslaunch rosbot_description rosbot.launch
If Rviz is needed, then run the following instead:
roslaunch rosbot_description rosbot_rviz.launch
In Terminal 1, launch sensors:
roslaunch rosbot_description rosbot_hardware.launch
In Terminal 2, launch mobile base and estimator:
roslaunch rosbot_ekf all.launch rosbot_pro:=true
In addition to previous steps (in Simulation or Real Robot), open a new terminal and run:
roslaunch rosbot_navigation keyboard_teleop.launch
According to ROSbot manual, we have the following APIs available.
Topic | Message type | Direction | Node | Description |
---|---|---|---|---|
/mpu9250 | rosbot_ekf/Imu | publisher | /serial_node | Raw IMU data in custom message type |
/range/fl | sensor_msgs/Range | publisher | /serial_node | Front left range sensor raw data |
/range/fr | sensor_msgs/Range | publisher | /serial_node | Front right range sensor raw data |
/range/rl | sensor_msgs/Range | publisher | /serial_node | Rear left range sensor raw data |
/range/rr | sensor_msgs/Range | publisher | /serial_node | Rear right range sensor raw data |
/joint_states | sensor_msgs/JointState | publisher | /serial_node | Wheels rotation angle |
/battery | sensor_msgs/BatteryState | publisher | /serial_node | Battery voltage |
/buttons | std_msgs/UInt8 | publisher | /serial_node | User buttons state, details in User buttons section |
/pose | geometry_msgs/PoseStamped | publisher | /serial_node | Position based on encoders |
/odom/wheel | nav_msgs/Odometry | publisher | /msgs_conversion | Odometry based on wheel encoders |
/velocity | geometry_msgs/Twist | publisher | /serial_node | Odometry based on encoders |
/imu | sensor_msgs/Imu | publisher | /msgs_conversion | IMU data wrapped in standard ROS message type |
/odom | nav_msgs/Odometry | publisher | /rosbot_ekf | Odometry based on sensor fusion |
/tf | tf2_msgs/TFMessage | publisher | /rosbot_ekf | ROSbot position based on sensor fusion |
/set_pose | geometry_msgs/ PoseWithCovarianceStamped | subscriber | /rosbot_ekf | Allow to set custom state of EKF |
/cmd_vel | geometry_msgs/Twist | subscriber | /serial_node | Velocity commands |
/config | rosbot_ekf/Configuration | service server | /serial_node | Allow to control behaviour of CORE2 board, detaild in CORE2 config section |