Skip to content

[Bug]: I can not move the robot. robotnik_base_controller Failed to Load in ROS2 Humble Simulation #49

@javadibrahimli

Description

@javadibrahimli

What happened?

Environment

  • OS: Ubuntu 22.04
  • ROS Distribution: ROS2 Humble
  • Package: robotnik_simulation (humble-devel branch)
  • Robot: rbsummit
  • Simulator: Gazebo Ignition/Gazebo Fortress

Description

When attempting to spawn the rbsummit robot using spawn_robot.launch.py, the robotnik_base_controller fails to load, preventing robot control via cmd_vel topics.

Steps to Reproduce

  1. Clone the repository:
cd ~/ros2_ws/src
git clone -b humble-devel https://github.com/RobotnikAutomation/robotnik_simulation.git
git clone -b humble-devel https://github.com/RobotnikAutomation/robotnik_msgs.git
  1. Install dependencies:
cd ~/ros2_ws
rosdep update
rosdep install --from-paths src --ignore-src -r -y
  1. Install the provided .deb package:
sudo dpkg -i ./robotnik_simulation/debs/ros-humble-robotnik-controllers*.deb
  1. Build the workspace:
colcon build --symlink-install
source install/setup.bash
  1. Launch the simulation:
# Terminal 1
ros2 launch robotnik_gazebo_ignition spawn_world.launch.py

# Terminal 2
ros2 launch robotnik_gazebo_ignition spawn_robot.launch.py robot:=rbsummit

Expected Behavior

The robot should spawn successfully with all controllers loaded and active, allowing control via:

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r cmd_vel:=/robot/robotnik_base_controller/cmd_vel -p stamped:=true

Actual Behavior

The robotnik_base_controller fails to load with the following error:

[spawner-5] [INFO] [1761258002.454792294] [robot.spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[spawner-5] [INFO] [1761258004.075605741] [robot.spawner_joint_state_broadcaster]: Configured and activated joint_state_broadcaster
[INFO] [spawner-5]: process has finished cleanly [pid 641673]
[INFO] [launch.user]: Joint States spawned
[INFO] [spawner-6]: process started with pid [641811]
[spawner-6] [FATAL] [1761258004.446524189] [robot.spawner_robotnik_base_controller]: Failed loading controller robotnik_base_controller
[ERROR] [spawner-6]: process has died [pid 641811, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner robotnik_base_controller --ros-args -r __ns:=/robot'].

Additional Information

Controller Configuration (rbsummit_ros2_control.yaml):

controller_manager:
  ros__parameters:
    use_sim_time: true
    update_rate: 100
    joint_state_broadcaster:
      type: joint_state_broadcaster/JointStateBroadcaster
    robotnik_base_controller:
      type: robotnik_controllers/RBSummitController

Diagnostic Commands Output:

$ ros2 pkg prefix robotnik_controllers
Package not found

$ ros2 control list_controller_types
[INFO] waiting for service /controller_manager/list_controller_types to become available...
# (hangs waiting for service)

Investigation

  1. The robotnik_controllers package is not being found in the workspace after building
  2. The provided .deb package installs to /opt/ros/humble but may not properly export the controller plugin
  3. Attempting to clone robotnik_controllers from source for the humble-devel branch may be necessary but unclear if branch exists

Questions

  1. Is the robotnik_controllers package available for ROS2 Humble?
  2. Should users build robotnik_controllers from source, or should the provided .deb work?
  3. If building from source, what is the correct repository URL and branch name?
  4. Are there any missing dependencies for the RBSummitController plugin?

Possible Solutions

Could you please provide:

  1. Instructions for properly installing robotnik_controllers for ROS2 Humble
  2. The correct repository URL and branch if building from source
  3. Any additional dependencies needed for the controller plugin
  4. Or, an updated .deb package with proper plugin exports

System Package Dependencies Installed

ros-humble-controller-manager
ros-humble-controller-interface
ros-humble-control-msgs
ros-humble-joint-state-broadcaster
ros-humble-joint-trajectory-controller
ros-humble-gazebo-ros2-control
ros-humble-gz-ros2-control
ros-humble-ign-ros2-control

[INFO] [launch.user]: Robot spawned
[INFO] [spawner-4]: process started with pid [645553]
[spawner-4] [WARN] [1761259206.911774317] [robot.spawner_joint_state_broadcaster]: Controller already loaded, skipping load_controller
[spawner-4] [ERROR] [1761259206.914008083] [robot.spawner_joint_state_broadcaster]: Failed to configure controller
[ERROR] [spawner-4]: process has died [pid 645553, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner joint_state_broadcaster --ros-args -r __ns:=/robot'].
[INFO] [launch.user]: Joint States spawned
[INFO] [launch.user]: Joint States spawned
[INFO] [spawner-5]: process started with pid [645583]
[spawner-5] [FATAL] [1761259207.264751148] [robot.spawner_robotnik_base_controller]: Failed loading controller robotnik_base_controller
[ERROR] [spawner-5]: process has died [pid 645583, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner robotnik_base_controller --ros-args -r __ns:=/robot'].

Thank you for your assistance!

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghumble

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions