Atom-machinerule / ua-ros-pkg

Automatically exported from code.google.com/p/ua-ros-pkg
0 stars 0 forks source link

Error with joint_trajectory_action_controller.py when an error occurs #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
While testing my code with fuerte, the joint_trajectory_action_controller.py 
module would sometimes die because it gets unexpected values, and then outputs 
a stack trace: 

[ERROR] [WallTime: 1337809749.854860] Incoming trajectory joints do not match 
the joints of the controller
[ERROR] [WallTime: 1337809749.856918] Exception in your execute callback: 'int' 
object has no attribute 'error_code'
Traceback (most recent call last):
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/actionlib/simple_action_server.py", line 292, in executeLoop
    self.execute_callback(goal)
  File "/home/bob/john/ros/dynamixel_motor/dynamixel_controllers/src/dynamixel_controllers/joint_trajectory_action_controller.py", line 145, in process_follow_trajectory
    self.process_trajectory(goal.trajectory)
  File "/home/bob/john/ros/dynamixel_motor/dynamixel_controllers/src/dynamixel_controllers/joint_trajectory_action_controller.py", line 155, in process_trajectory
    self.action_server.set_aborted(result=res, text=msg)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/actionlib/simple_action_server.py", line 170, in set_aborted
    self.current_goal.set_aborted(result, text);
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/actionlib/server_goal_handle.py", line 172, in set_aborted
    self.action_server.publish_result(self.status_tracker.status, result);
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/actionlib/action_server.py", line 177, in publish_result
    self.result_pub.publish(ar);
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/topics.py", line 792, in publish
    self.impl.publish(data)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/topics.py", line 968, in publish
    serialize_message(b, self.seq, message)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/msg.py", line 152, in serialize_message
    msg.serialize(b)
  File "/opt/ros/fuerte/stacks/control/control_msgs/src/control_msgs/msg/_FollowJointTrajectoryActionResult.py", line 158, in serialize
    buff.write(_struct_i.pack(self.result.error_code))
AttributeError: 'int' object has no attribute 'error_code'

The issue is that joint_trajectory_action_controller.py returns an 'int' as the 
result, rather than the FollowJointTrajectoryResult, that ROS expects. I've 
attached a Patch which addresses this issue. 

Original issue reported on code.google.com by haro...@gmail.com on 23 May 2012 at 10:04

Attachments:

GoogleCodeExporter commented 8 years ago
Great, thanks for the report and the patch! Applied in r1627.

Original comment by areb...@gmail.com on 23 May 2012 at 10:23