ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi Masihec, You have to use server.setPose( feedback.marker_name, pose ) to change/constrain the position of Interactive marker. A sample code is given below.

def processFeedback(self, feedback):
     # Trim the position in X of the marker
     if feedback.pose.position.x < 0:
         feedback.pose.position.x = 0
     if feedback.pose.position.x > 10:
         feedback.pose.position.x = 10
    # Apply changes to the marker.
     server.setPose( feedback.marker_name, feedback.pose)
     self.server.applyChanges()

Hi Masihec, You have to use server.setPose( feedback.marker_name, pose ) to change/constrain the position of Interactive marker. A sample code is given below.

def processFeedback(self, feedback):
     # Trim the position in X of the marker
     if feedback.pose.position.x < 0:
         feedback.pose.position.x = 0
     if feedback.pose.position.x > 10:
         feedback.pose.position.x = 10
    # Apply changes to the marker.
     server.setPose( self.server.setPose( feedback.marker_name, feedback.pose)
     self.server.applyChanges()

Hi Masihec, You have to use server.setPose( feedback.marker_name, pose ) to change/constrain the position of Interactive marker. A sample code is given below.

def processFeedback(self, feedback):
processFeedback(feedback):
     # Trim the position in X of the marker
     if feedback.pose.position.x < 0:
         feedback.pose.position.x = 0
     if feedback.pose.position.x > 10:
         feedback.pose.position.x = 10
    # Apply changes to the marker.
     self.server.setPose( server.setPose( feedback.marker_name, feedback.pose)
     self.server.applyChanges()
server.applyChanges()