ROS melodic crash in controller_manager
Hi everyone,
I recently set up my ros-melodic work environment (on Ubuntu) for a project and received the following error during controller switching in controller_manager:
Traceback (most recent call last):
File “/opt/ros/melodic/lib/controller_manager/spawner”, line 207, in
if name == ‘main’: main()
File “/opt/ros/melodic/lib/controller_manager/spawner”, line 199, in main
resp = switch_controller(loaded, , 2, False, 0.0)
File “/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py”, line 439, in call
return self.call(*args, **kwds)
File “/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py”, line 495, in call
request = rospy.msg.args_kwds_to_message(self.request_class, args, kwds)
File “/opt/ros/melodic/lib/python2.7/dist-packages/rospy/msg.py”, line 124, in args_kwds_to_message
return data_class(*args)
File “/opt/ros/melodic/lib/python2.7/dist-packages/controller_manager_msgs/srv/_SwitchController.py”, line 59, in init
super(SwitchControllerRequest, self).init(*args, **kwds)
File “/opt/ros/melodic/lib/python2.7/dist-packages/genpy/message.py”, line 301, in init
raise TypeError(“Invalid number of arguments, args should be %s”%str(self.slots)+" args are"+str(args))
TypeError: Invalid number of arguments, args should be [‘start_controllers’, ‘stop_controllers’, ‘strictness’] args are([‘joint_state_controller’, ‘PandaStatePublisher’], , 2, False, 0.0)
it seems that in line 199 of ‘/opt/ros/melodic/lib/controller_manager/spawner’ switch_control is called in the following manner:
resp = switch_controller(loaded, , 2, False, 0.0)
which causes the crash due to invalid number of arguments. I checked with a colleague that uses the same code and his version of ROS contains different inputs in that line. Could it be that some recent changes in ROS cause this crash? can anyone suggest some way to work around this?
Thanks!
I would suggest to verify which versions of the
controller_manager
package you and your colleague have.Assuming you've installed ROS using
apt
: what is the output ofdpkg -l | grep melodic-controller-manager
?Thanks for the reply! I will check with my colleague as you suggested. The output I get when using your suggestion is: