Rosanswers logo

Hey guys,

i want to declare the startup state of my UR5 Robot for motion planning in MoveIt (using a Python script). Every time i launch the demo file in RViz, the robot is lying flat on the ground (all joint states are zero). How can i define the start pose of the robot? I already declared the following:

pub_pos = rospy.Publisher('arm_pos', Pose, queue_size=10)    

scene = PlanningSceneInterface()
robot = RobotCommander()
group = MoveGroupCommander("manipulator")

Thanks for your support. Im running ROS Indigo on Ubuntu 14.04

Originally posted by Rhemus on ROS Answers with karma: 79 on 2017-03-01

Post score: 1

Original comments

Comment by gvdhoorn on 2017-03-01:
Can you please include some text on what you've already tried? This has been asked a few times already, so if you've tried some things but they didn't work that would be good to include as it would avoid readers suggesting the same things.


1 Answer 1


Rosanswers logo

This is not Python specific.

Initial states of the robot when simulated with demo.launch can be set to named targets in config/fake_controllers.yaml. See http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/fake_controller_manager_tutorial.html?highlight=fake#yaml-file-examples for an example.

Originally posted by v4hn with karma: 2950 on 2017-03-01

This answer was ACCEPTED on the original site

Post score: 3

Original comments

Comment by Rhemus on 2017-03-01:
If i add

      - group: arm
        pose:  home

where do i define what "home" is?

Comment by v4hn on 2017-03-01:
home has to be a named target. These are defined in your robot's srdf file. You can either add them by hand or use the moveit_setup_assistant

Comment by Rhemus on 2017-03-01:
Thank you it worked!

Comment by fvd on 2018-07-10:
I can't edit this answer, but the link is dead: http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/fake_controller_manager/fake_controller_manager_tutorial.html


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.