dynamixel_motor launch file timing problems [closed]

asked 2013-07-25 16:34:37 -0600

Pi Robot gravatar image


I've been using the most excellent dynamixel_motor stack for a couple of years now. Recently (Ubuntu 12.04, Groovy debs), there seems to be an issue with the timing of when the dynamixel_motor controller nodes are launched. Sometimes all the nodes fire up and connect to each other. At other times it appears that not all the joint controllers are loaded. If I split the launch file into three separate launch files and run them in sequence, I can make it work 100% of the time. But if I glue them together as one launch file, at least one joint usually does not load.

I will post my launch file below but first here is a typical error output when something goes wrong:

[INFO] [WallTime: 1374805698.373428] dynamixel_ax12: Pinging motor IDs 1 through 6...
process[robot_monitor-6]: started with pid [25323]
[INFO] [WallTime: 1374805698.651452] dynamixel_ax12: Found 6 motors - 6 AX-12 [1, 2, 3, 4, 5, 6], initialization complete.
[INFO] [WallTime: 1374805698.662196] dynamixel_rx24: Pinging motor IDs 21 through 22...
[INFO] [WallTime: 1374805698.741967] dynamixel_rx24 controller_spawner: waiting for controller_manager pi_dynamixel_manager to startup in global namespace...
[INFO] [WallTime: 1374805698.775654] dynamixel_rx24: Found 2 motors - 2 RX-24 [21, 22], initialization complete.
process[world_base_broadcaster-7]: started with pid [25476]
[INFO] [WallTime: 1374805698.946841] dynamixel_ax12 controller_spawner: waiting for controller_manager pi_dynamixel_manager to startup in global namespace...
[INFO] [WallTime: 1374805698.952901] dynamixel_ax12 controller_spawner: All services are up, spawning controllers...
[INFO] [WallTime: 1374805698.994594] Controller right_arm_shoulder_roll_controller successfully started.
process[right_arm_controller-8]: started with pid [25559]
[INFO] [WallTime: 1374805699.042321] Controller right_arm_elbow_flex_controller successfully started.
[INFO] [WallTime: 1374805699.055872] dynamixel_rx24 controller_spawner: All services are up, spawning controllers...
Traceback (most recent call last):
  File "/opt/ros/groovy/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 619, in _handle_request
    response = convert_return_to_response(self.handler(request), self.response_class)
  File "/opt/ros/groovy/stacks/dynamixel_motor/dynamixel_controllers/nodes/controller_manager.py", line 222, in start_controller
    controller = kls(self.serial_proxies[port_name].dxl_io, controller_name, port_name)
  File "/opt/ros/groovy/stacks/dynamixel_motor/dynamixel_controllers/src/dynamixel_controllers/joint_position_controller.py", line 59, in __init__
    JointController.__init__(self, dxl_io, controller_namespace, port_namespace)
  File "/opt/ros/groovy/stacks/dynamixel_motor/dynamixel_controllers/src/dynamixel_controllers/joint_controller.py", line 70, in __init__
    self.joint_name = rospy.get_param(self.controller_namespace + '/joint_name')
  File "/opt/ros/groovy/lib/python2.7/dist-packages/rospy/client.py", line 452, in get_param
    return _param_server[param_name] #MasterProxy does all the magic for us
  File "/opt/ros/groovy/lib/python2.7/dist-packages/rospy/msproxy.py", line 115, in __getitem__
    code, msg, value = self.target.getParam(rospy.names.get_caller_id(), resolved_key)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
  File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1289, in single_request
    self.send_request(h, handler, request_body)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1391, in send_request
    connection.putrequest("POST", handler, skip_accept_encoding=True)
  File "/usr/lib/python2.7/httplib.py", line ...
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2017-11-30 10:33:30.392521


This is weird, I have never had problems with launch order. The error message doesn't look like launch order problem though.

arebgun gravatar image arebgun  ( 2013-08-02 16:26:40 -0600 )edit

@arebgun - any idea what the error means or what might cause it? I never get it if I split up the launch files as noted in my question. I was wondering if maybe there needs to be a "wait_for_message" or "wait_for_service" call somewhere in the code that starts the controllers?

Pi Robot gravatar image Pi Robot  ( 2013-08-04 04:47:16 -0600 )edit