ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

moveit: How to change the initial pose for robot in Rviz?

asked 2021-04-11 23:03:32 -0600

xiaozhenghong gravatar image

updated 2021-04-12 02:37:29 -0600

gvdhoorn gravatar image

I used 'moveit_setup_assitant' to config my robot, but I cannot find where can I set the robot's initial pose. The question is that the robot's initial pose in simulation environment is not the same as the one in real world. So is there any way to change the initial pose when I launch the robot in 'demo.launch'?

edit retag flag offensive close merge delete


I've updated the title to mention MoveIt, as it would appear that's the context in which you asked this question.

gvdhoorn gravatar image gvdhoorn  ( 2021-04-12 02:38:08 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2021-04-12 01:05:38 -0600

fvd gravatar image

Add an entry to fake_controllers.yaml referencing the named poses like this:

  - group: panda_arm
    pose: ready
  - group: hand
    pose: open
edit flag offensive delete link more


thx for your answering! The method works will in the fake_controllers.yaml, but I use ros_controller.yaml as controllers of my robot(in order to get way points from planning, I set fake_execution in demo.launch to be false). And I found the method will not work in this controller file.

  - name: left_manipulator_controller
    action_ns: follow_joint_trajectory
    default: True
    type: FollowJointTrajectory
      - ljoint1
      - ljoint2
      - ljoint3
      - ljoint4
      - ljoint5
      - ljoint6
      - ljoint7
  - name: right_manipulator_controller
    action_ns: follow_joint_trajectory
    default: True
    type: FollowJointTrajectory
      - rjoint1
      - rjoint2
      - rjoint3
      - rjoint4
      - rjoint5
      - rjoint6
      - rjoint7
  - group: left_manipulator
    pose: left_original
xiaozhenghong gravatar image xiaozhenghong  ( 2021-04-12 01:25:01 -0600 )edit

The position of your real-world robot is determined by reality, not the setting in your YAML. If you want the robot to move to a certain pose, you should plan and execute a motion to it.

Also, consider using your_moveit_config_planning_execution.launch instead of demo.launch if you don't use the fake controllers.

fvd gravatar image fvd  ( 2021-04-12 01:30:54 -0600 )edit

Ok, thx again!

xiaozhenghong gravatar image xiaozhenghong  ( 2021-04-12 01:32:57 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2021-04-11 23:03:32 -0600

Seen: 622 times

Last updated: Apr 12 '21