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

Controller Spawner couldn't find the expected controller_manager ROS interface. #30

Open
yuan0623 opened this issue Jun 20, 2018 · 28 comments

Comments

@yuan0623
Copy link

Dave
Hi, my name is Yuan and I'm following the tutorial Gazebo ROS demo, I have a smooth experience on following the tutorial except for the rrbot_control package. When I type 'roslaunch rrbot_control rrbot_control.launch' , I didn't get expected behaviour. Instead I get a warning message: [WARN] [WallTime: 1529028805.545238] [835.983000] Controller Spawner couldn't find the expected controller_manager ROS interface.
When I type rosservise list, I didn't see control/manager at all.
I download the ROS demo pkg directly from github into my workspace and 'catkin build' the package. I'm using ROS-indigo on Ubuntu 14.04. I also have Gazebo 7 installed. What can be wrong? Do you have similar experience?
Looking forward your respond!
Best

@davetcoleman
Copy link
Collaborator

Off the top of my head I do not know what is wrong, sorry.

@kiranpallacom
Copy link

@yuan0623 This problem occurs when you launch the rrbot_control demo while a gazebo server process is already running (in the background). Check for stray gserver processes, kill them & re-launch rrbot_control to make it work.

@ipa-msa
Copy link

ipa-msa commented Nov 8, 2018

make sure you have gazebo_ros_pkgs installed http://gazebosim.org/tutorials?tut=ros_installing

@yuan0623
Copy link
Author

Thank you, guys :)

@cpuwanan
Copy link

cpuwanan commented Apr 5, 2019

This could be helpful
$ sudo apt-get install ros-kinetic-joint-state-controller
$ sudo apt-get install ros-kinetic-effort-controllers
$ sudo apt-get install ros-kinetic-position-controllers

@Ekanshh
Copy link

Ekanshh commented Jan 27, 2020

Check if the ros package has all the dependencies and install the necessary dependencies:
rosdep check *package name*
install the necessary dependencies using:
rosdep install -i <package name>
or else, try to run roslaunch directly, without going into the catkin_ws:
roslaunch *package_name* *launch_file*

@dk008652
Copy link

I have installed gazebo_ros_pkgs and even it does show that controller_manager is present in rosservice list but still having this problem
controller

spawner

@pringithub
Copy link

I don't see the /rrbot/controller_manager either, just the controller_spawner ... any help?

@KingCoCos
Copy link

sudo apt-get install ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control
make sure you have installed “ros-kinetic-gazebo-ros-control”
after installation, restart the terminal

@saadi-tech
Copy link

I also have the same problem on Melodic, I have tried literally everything.. :( SOmeone please help me out.....
First I get this error for all joints, even though I have defined the PID controllers in .yaml file.

[ERROR] [1587451335.148328678, 0.195000000]: No p gain specified for pid. Namespace: /robot/gazebo_ros_control/pid_gains/j1

then after like 20 secs, it shows the warning:
[WARN] [1587451349.966721, 14.843000]: Controller Spawner couldn't find the expected controller_manager ROS interface.

Please help me out. Im using ROS melodic, and I have installed all the needed packages.

@DroppedOut
Copy link

I have same problem on Melodic
Screenshot at 2020-04-25 15-36-23
Screenshot at 2020-04-25 15-36-13

@norn93
Copy link

norn93 commented Apr 26, 2020

To fix the PID gains issue, you need to load those params in. Something like a file called gazebo_pid.yaml:

  gazebo_ros_control:
    pid_gains:
      front_right_wheel_joint:
        p: 0.1
        i: 1
        d: 0
      back_right_wheel_joint:
        p: 0.1
        i: 1
        d: 0
      front_left_wheel_joint:
        p: 0.1
        i: 1
        d: 0
      back_left_wheel_joint:
        p: 0.1
        i: 1
        d: 0

And then load it into your launch file using:

  <!-- Load the gazebo params -->
  <rosparam command="load"
          file="$(find bb1_bringup)/config/gazebo_pid.yaml"
  />

I still have the error you guys describe though:

[WARN] [1587451349.966721, 14.843000]: Controller Spawner couldn't find the expected controller_manager ROS interface.

I'm not sure how to fix this either.

@imeshsps
Copy link

Controller Spawner couldn't find the expected controller_manager ROS interface.

Hey.. for me it was package version mismatching. An package update might fix it.

@KingCoCos
Copy link

Maybe this answer will be helpful: https://answers.ros.org/question/214712/gazebo-controller-spawner-warning/

@brschettini
Copy link

It happened to me right now and I realized that a gzclient process was stuck in background.

ps -ef | grep gzclient

If that's the case, just kill it or restart you computer.

@suyashhchougule
Copy link

To fix the PID gains issue, you need to load those params in. Something like a file called gazebo_pid.yaml:

  gazebo_ros_control:
    pid_gains:
      front_right_wheel_joint:
        p: 0.1
        i: 1
        d: 0
      back_right_wheel_joint:
        p: 0.1
        i: 1
        d: 0
      front_left_wheel_joint:
        p: 0.1
        i: 1
        d: 0
      back_left_wheel_joint:
        p: 0.1
        i: 1
        d: 0

And then load it into your launch file using:

  <!-- Load the gazebo params -->
  <rosparam command="load"
          file="$(find bb1_bringup)/config/gazebo_pid.yaml"
  />

I still have the error you guys describe though:

[WARN] [1587451349.966721, 14.843000]: Controller Spawner couldn't find the expected controller_manager ROS interface.

I'm not sure how to fix this either.

After adding pid values i get following error :
TypeError: cannot marshal None unless allow_none is enabled
[rosout-1] killing on exit
[master] killing on exit

please help someone

@MichelleHusbands
Copy link

Has someone been successful in fixing the error? I am still getting the same warning before the controller_spawner process ends.

[WARN] [1587451349.966721, 14.843000]: Controller Spawner couldn't find the expected controller_manager ROS interface.

I checked, and all the required packages are installed, I have also installed a few ones I do not think we need but thought it might solve the error: controller-interface, controller-manager, controller-manager-msgs, controller-manager-tests, control-msgs, control-toolbox

@MichelleHusbands
Copy link

So, for who might help, at the end I forgot to set up the robotNamespace tag inside the gazebo tag calling the gazebo_ros_control plugin in my urdf. Once I set up this robotNamespace to the same I was using in my yaml files and launch file.

@AlbertoGhiotto
Copy link

So, for who might help, at the end I forgot to set up the robotNamespace tag inside the gazebo tag calling the gazebo_ros_control plugin in my urdf. Once I set up this robotNamespace to the same I was using in my yaml files and launch file.

@MichelleHusbands could you be more specific about which yaml and launch files are you talking about? I too am having the same issue, I too have the robotNamespace tag empty but I don't know how to fill it. Thanks!

@ZhengQiushi
Copy link

I have installed gazebo_ros_pkgs and even it does show that controller_manager is present in rosservice list but still having this problem
controller

spawner

you'd better check your configuration in the .gazebo.xacro file!
<gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotNamespace>/open_manipulator</robotNamespace> <controlPeriod>0.001</controlPeriod> <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType> <legacyModeNS>true</legacyModeNS> </plugin> </gazebo>
The /open_manipulator is a must which is corresponding to your ns in the launch file !

@C-monC
Copy link

C-monC commented Jan 29, 2021

The above comment helped me after 2 days of searching. Replace the gazebo tag in your xacro with the above code (change the namespace to yours). A package that checks for the reason these warnings/failures could help lower the barrier to entry. It's extremely hard finding these obscure faults.

@zhuhongwu0918
Copy link

The above comment helped me after 2 days of searching. Replace the gazebo tag in your xacro with the above code (change the namespace to yours). A package that checks for the reason these warnings/failures could help lower the barrier to entry. It's extremely hard finding these obscure faults.

I also find this issue in the open_manipultor package. After adding /open_manipulator in the .gazebo.xacro file. But it still doesn't work.

[WARN] [1647272608.525539, 0.000000]: Controller Spawner couldn't find the expected controller_manager ROS interface.

@ovc24
Copy link

ovc24 commented Feb 12, 2023

Hi, I solved the same problem in my urdf document only commenting this line:

Captura de pantalla de 2023-02-12 15-40-34

@zp2546265641
Copy link

I also have the same problem on Melodic, I have tried literally everything.. :( SOmeone please help me out..... First I get this error for all joints, even though I have defined the PID controllers in .yaml file.

[ERROR] [1587451335.148328678, 0.195000000]: No p gain specified for pid. Namespace: /robot/gazebo_ros_control/pid_gains/j1

then after like 20 secs, it shows the warning: [WARN] [1587451349.966721, 14.843000]: Controller Spawner couldn't find the expected controller_manager ROS interface.

Please help me out. Im using ROS melodic, and I have installed all the needed packages.
hey,boy! have you solved? i meet the same problem as yours' description!!!

@zp2546265641
Copy link


hello,i load such file,but my ggazebo launch failed,and it told:waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 31
Current serial number in output stream: 32
[ INFO] [1719229787.754822222]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1719229787.755711288]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 31
Current serial number in output stream: 32
[INFO] [1719229817.617557, 0.000000]: Waiting for /clock to be available...
[INFO] [1719229817.618645, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1719229817.711117, 0.000000]: Waiting for /clock to be available...
[INFO] [1719229817.712228, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1719229847.728829, 0.000000]: Waiting for /clock to be available...

@zp2546265641
Copy link

and now 2024? have someone solved it? so so so thanls

@dhruvil122
Copy link

and now 2024? have someone solved it? so so so thanls

Hey man. Yes there are some simple steps yoy can follow. I just solved it right now.

  1. check if rosdep is working properly in your ros setup. In most cases, it should work. if it does not, fix it first.
  2. check the rosrun command working or not. if not fix it.
  3. type rosrun controller_manager controller_manager and see if the node works or not. if you see anything on screen such as list and all commands, it works.
  4. if it doesn't show anything, then first install the controller_manager. type sudo apt-get install --reinstall ros-noetic-controller-manager
  5. after that see what type of controllers are there in your ros. run your file and simultaneously run rosrun controller_manager controller_manager list in new terminal.
  6. it should list all the controllers.
  7. if the error still persist, use command rosrun controller_manager controller_manager list-types. in this types you should check the controller type you are using. in most cases, effort_controller/joint_trajectory_controller.
  8. if it is not there, use sudo apt-get install joint_trajectory_controller. after installation, rebuilt workspace and run your launch file.
  9. if anything doesn't work, reinstall ros. you can use chatgpt for ros reinstallation.
  10. moreover, i would also suggest you to type rospack check your_package_name in order to check if you have all the dependencies installed or not.
    if you still can not solve it. contact me via this chat.

@zp2546265641
Copy link

and now 2024? have someone solved it? so so so thanls

Hey man. Yes there are some simple steps yoy can follow. I just solved it right now.

  1. check if rosdep is working properly in your ros setup. In most cases, it should work. if it does not, fix it first.
  2. check the rosrun command working or not. if not fix it.
  3. type rosrun controller_manager controller_manager and see if the node works or not. if you see anything on screen such as list and all commands, it works.
  4. if it doesn't show anything, then first install the controller_manager. type sudo apt-get install --reinstall ros-noetic-controller-manager
  5. after that see what type of controllers are there in your ros. run your file and simultaneously run rosrun controller_manager controller_manager list in new terminal.
  6. it should list all the controllers.
  7. if the error still persist, use command rosrun controller_manager controller_manager list-types. in this types you should check the controller type you are using. in most cases, effort_controller/joint_trajectory_controller.
  8. if it is not there, use sudo apt-get install joint_trajectory_controller. after installation, rebuilt workspace and run your launch file.
  9. if anything doesn't work, reinstall ros. you can use chatgpt for ros reinstallation.
  10. moreover, i would also suggest you to type rospack check your_package_name in order to check if you have all the dependencies installed or not.
    if you still can not solve it. contact me via this chat.

Thank you very much, I changed the subject and I think I solved it, or I forgot, but it doesn't matter anymore. However, if I encounter this problem again, I will try to solve it! Thanks again.

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

No branches or pull requests