Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save prrraveen/4dc1b4b7b9fbfb2266a3 to your computer and use it in GitHub Desktop.
Save prrraveen/4dc1b4b7b9fbfb2266a3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# move_group_python_interface_tutorial.py
## BEGIN_SUB_TUTORIAL imports
##
## To use the python interface to move_group, import the moveit_commander
## module. We also import rospy and some messages that we will use.
import sys
import copy
import rospy
import moveit_commander
import moveit_msgs.msg
import geometry_msgs.msg
## END_SUB_TUTORIAL
from std_msgs.msg import String
def move_group_python_interface_tutorial():
## BEGIN_TUTORIAL
##
## Setup
## ^^^^^
## CALL_SUB_TUTORIAL imports
##
## First initialize moveit_commander and rospy.
print "============ Starting tutorial setup"
moveit_commander.roscpp_initialize(sys.argv)
rospy.init_node('move_group_python_interface_tutorial',
anonymous=True)
## Instantiate a RobotCommander object. This object is an interface to
## the robot as a whole.
robot = moveit_commander.RobotCommander()
if __name__=='__main__':
try:
move_group_python_interface_tutorial()
except rospy.ROSInterruptException:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment