Skip to content

Commit

Permalink
added description for set_start_state (moveit#447)
Browse files Browse the repository at this point in the history
* added description for set_start_state

* update example description for set_start_state

non-existing variables are updated with sample values
  • Loading branch information
Ravi Prakash Joshi authored and v4hn committed Feb 16, 2017
1 parent 42adb4a commit eebeddc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions moveit_commander/src/moveit_commander/move_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,26 @@ def set_start_state_to_current_state(self):
self._g.set_start_state_to_current_state()

def set_start_state(self, msg):
"""
Specify a start state for the group.
Parameters
----------
msg : moveit_msgs/RobotState
Examples
--------
>>> from moveit_msgs.msg import RobotState
>>> from sensor_msgs.msg import JointState
>>> joint_state = JointState()
>>> joint_state.header = Header()
>>> joint_state.header.stamp = rospy.Time.now()
>>> joint_state.name = ['joint_a', 'joint_b']
>>> joint_state.position = [0.17, 0.34]
>>> moveit_robot_state = RobotState()
>>> moveit_robot_state.joint_state = joint_state
>>> group.set_start_state(moveit_robot_state)
"""
self._g.set_start_state(conversions.msg_to_string(msg))

def get_joint_value_target(self):
Expand Down

0 comments on commit eebeddc

Please sign in to comment.