def updatePoseTopic(self, next_index, wait=True):
planning_group = self.planning_groups_keys[self.current_planning_group_index]
topics = self.planning_groups[planning_group]
if next_index >= len(topics):
self.current_eef_index = 0
elif next_index < 0:
self.current_eef_index = len(topics) - 1
else:
self.current_eef_index = next_index
next_topic = topics[self.current_eef_index]
rospy.loginfo("Changed controlled end effector to " + self.planning_groups_tips[planning_group][self.current_eef_index])
self.pose_pub = rospy.Publisher(next_topic, PoseStamped, queue_size=5)
if wait:
self.waitForInitialPose(next_topic)
self.current_pose_topic = next_topic
评论列表
文章目录