This package contains a ROS2 robot model description for Robotnik's RB-1 mobile base.
- Differential drive controller plugin added to command robot with Twist messages
- Effort controller added to control robot's lifting unit
This package only modifies/adapts files from these repositories/packages:
- RobotnikAutomation/rb1_base_sim licensed under the BSD 2-Clause "Simplified" License
- RobotnikAutomation/rb1_base_common/rb1_base_description, licensed under the BSD License
- [RobotnikAutomation/robotnik_sensors],(https://github.com/RobotnikAutomation/robotnik_sensors) licensed under the BSD License
Prerequisites:
- ROS2 Galactic installed and sourced
- Gazebo (compatible with ROS2 Galactic)
rosdepfor dependency installation
Steps:
- Clone this repository into your ROS2 workspace
srcdirectory:cd ~/ros2_ws/src git clone <this-repo-url>
- Install dependencies:
cd ~/ros2_ws rosdep install --from-paths src --ignore-src -r -y
- Build the workspace:
colcon build
- Source the workspace:
source install/setup.bash
To launch the simulation use command given below. Also spawns the robot and controllers.
ros2 launch rb1_ros2_description rb1_ros2_xacro.launch.pyAfter the launch process finished; check nodes, hardware interfaces and controllers loaded successfully in a new terminal
ros2 node listExpected result:
/controller_manager
/gazebo
/platform_controller
/rb1_base_controller
/rb1_robot/gazebo_ros2_control
/rb1_robot/robot_state_publisher
ros2 control list_hardware_interfacesros2 control list_controllersExpected result:
rb1_base_controller [diff_drive_controller/DiffDriveController] active platform_controller [effort_controllers/JointGroupEffortController] active
We also need to check the service for actuating the lift
ros2 service list | grep /apply_joint_effortTo move the robot (e.g., rotate in place):
ros2 topic pub --rate 10 /rb1_base_controller/cmd_vel_unstamped geometry_msgs/msg/Twist "{linear: {x: 0.0, y: 0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.2}}"To move the lift up:
ros2 service call /apply_joint_effort gazebo_msgs/srv/ApplyJointEffort '{joint_name: "robot_elevator_platform_joint", effort: 1.0, start_time: {sec: 0, nanosec: 0}, duration: {sec: 2000, nanosec: 0} }'To move the lift down:
ros2 service call /apply_joint_effort gazebo_msgs/srv/ApplyJointEffort '{joint_name: "robot_elevator_platform_joint", effort: -1.0, start_time: {sec: 0, nanosec: 0}, duration: {sec: 2000, nanosec: 0} }'