The package uses ros2_control to communicate with the ROSbot's 2R, ROSbot's 2 PRO and ROSbot's XL hardware. ROSbots contain micro-ros firmware which provides the encoders and the imu measurements and the motors speed commander.
/cmd_vel
(geometry_msgs/Twist, /rosbot_base_controller)/_motors_response
(sensor_msgs/msg/JointState, /rosbot_system_node)/_imu/data_raw
(sensor_msgs/msg/Imu, /imu_sensor_node)
/imu_broadcaster/imu
(sensor_msgs/Imu, /imu_broadcaster)/rosbot_base_controller/odom
(nav_msgs/Odometry, /rosbot_base_controller)/_motors_cmd
(std_msgs/msg/Float32MultiArray, /rosbot_system_node)
- Add this repository to ros2 workspace
cd src/
git clone https://github.com/husarion/rosbot_hardware_interfaces
- Add to the Rosbot description following lines:
<xacro:include filename="$(find rosbot_hardware_interfaces)/urdf/ros2_control.urdf.xacro" />
<xacro:ros2_control_system/>
- Configure and launch the controller with the example usage.
ros2 launch rosbot_hardware_interfaces example_diff_drive.launch.py