Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] [controller_manager]: Could not initialize the controller named 'diffdrive_controller' #988

Open
SpaceSoarer90 opened this issue Sep 30, 2024 · 2 comments

Comments

@SpaceSoarer90
Copy link

Describe the Bug
[webots_controller_TurtleBot3Burger-5] [ERROR] [1727690103.628136189] [controller_manager]: Could not initialize the controller named 'diffdrive_controller'
[webots_controller_TurtleBot3Burger-5] Exception thrown during init stage with message: Invalid value set during initialization for parameter 'left_wheel_names': Parameter 'left_wheel_names' cannot be empty.

Trying the webots_ros2_turtlebot package but fails on the 'diffdrive_controller' node. This makes me unable to use the teleop nodes. I know that it uses "/opt/ros/jazzy/share/webots_ros2_turtlebot/resource/ros2control.yml" as the --params-file, however, that seems to be complete.

...
diffdrive_controller:
  ros__parameters:
    left_wheel_names: ["left wheel motor"]
    right_wheel_names: ["right wheel motor"]
...

Steps to Reproduce

  1. Install necessary packages for webots_ros2_turtlebot (webots, ros2, ros-jazzy-ros2-turtle
  2. $ ros2 launch webots_ros2_turtlebot robot_launch.py
  3. See terminal for the error.

Expected behavior
Being able to drive the robot with teleop nodes.

Affected Packages
List of affected packages:

  • webots_ros2_turtlebot

Screenshots
image
image

System

  • Webots Version: [e.g., R2019b, R2020a revision 1]
  • ROS Version: [e.g., Dashing, Eloquent]
  • Operating System: [e.g., Windows 10, Linux Ubuntu 18.04, macOS Mojave]
  • Graphics Card: [e.g., NVIDIA GeForce RTX 2080 11 GB, AMD Radeon RX 580 8GB, etc.]

Additional context
The wifi card of my laptop is not working, maybe that is the problem? The webots_controller python script uses ipc by default but maybe using tcp would be better?

@patham9
Copy link

patham9 commented Oct 25, 2024

Webots has been broken for quite some time for ROS2, I suggest using Gazebo.

@legubiao
Copy link

Hi I also enter this problem, and I solved it by modifying the launch file spawner parts to add the param file, like this:

    diff_drive_controller_spawner = Node(
        package='controller_manager',
        executable='spawner',
        arguments=["diff_drive_controller",
                   "--param-file", ros2_control_params] + controller_manager_timeout,
    )

I tested on ubuntu 24.04, ROS2 Jazzy, Webots 2023A from apt install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants