@@ -93,13 +93,18 @@ class MoveItPlanner(PlannerBackend):
9393 GetPlanningSceneResponse )
9494
9595 def init_planner (self ):
96- self .collision_object_topic = Topic (self , '/collision_object' ,
97- 'moveit_msgs/CollisionObject' , queue_size = None )
96+ self .collision_object_topic = Topic (
97+ self ,
98+ '/collision_object' ,
99+ 'moveit_msgs/CollisionObject' ,
100+ queue_size = None )
98101 self .collision_object_topic .advertise ()
99102
100103 self .attached_collision_object_topic = Topic (
101- self , '/attached_collision_object' ,
102- 'moveit_msgs/AttachedCollisionObject' , queue_size = None )
104+ self ,
105+ '/attached_collision_object' ,
106+ 'moveit_msgs/AttachedCollisionObject' ,
107+ queue_size = None )
103108 self .attached_collision_object_topic .advertise ()
104109
105110 def dispose_planner (self ):
@@ -133,7 +138,10 @@ def inverse_kinematics_async(self, callback, errback, frame, base_link, group,
133138 avoid_collisions = avoid_collisions ,
134139 attempts = attempts )
135140
136- self .GET_POSITION_IK (self , (ik_request , ), callback , errback )
141+ def convert_to_positions (response ):
142+ callback (response .solution .joint_state .position )
143+
144+ self .GET_POSITION_IK (self , (ik_request , ), convert_to_positions , errback )
137145
138146 def forward_kinematics_async (self , callback , errback , joint_positions , base_link ,
139147 group , joint_names , ee_link ):
@@ -145,8 +153,11 @@ def forward_kinematics_async(self, callback, errback, joint_positions, base_link
145153 robot_state = RobotState (
146154 joint_state , MultiDOFJointState (header = header ))
147155
156+ def convert_to_frame (response ):
157+ callback (response .pose_stamped [0 ].pose .frame )
158+
148159 self .GET_POSITION_FK (self , (header , fk_link_names ,
149- robot_state ), callback , errback )
160+ robot_state ), convert_to_frame , errback )
150161
151162 def plan_cartesian_motion_async (self , callback , errback , frames , base_link ,
152163 ee_link , group , joint_names , joint_types ,
0 commit comments