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

[MoveIt!] How to set a start pose with python?

asked 2016-10-11 09:41:59 -0500

F4bich gravatar image

Hi guys,

is it possible to set the pose (e.g. described as a list of joint angles) of the robot to certain values without planning a path, using the python move_group interface? Possibly there doesn't exist a path from my current pose A to the desired start pose B, but I want to find a path from B to C.

I think the 'set_start_state' function is supposed to provide this; however, I don't know how the start point is supposed to be specified (as msg).

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-10-11 18:21:27 -0500

JoshMarino gravatar image

It appears to be a RobotState message from here. You can print out the start_state to see what it consists of.

edit flag offensive delete link more

Comments

Using the robot_state doesn't work for me. I used these functions:

state = robot.get_current_state()
group.set_start_state(state)

If the state is set like that, and then a path is planned somewhere else, the path will start in the state it was before setting it to something else.

F4bich gravatar image F4bich  ( 2016-10-12 07:12:45 -0500 )edit
0

answered 2020-09-03 00:03:16 -0500

Rufus gravatar image

If you're simulating with gazebo, you can set the start pose when spawning the robot in the launch file like so:

<include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" default="worlds/empty.world"/>
    <arg name="paused" value="true"/>
    <arg name="gui" value="$(arg gui)"/>
</include>

<node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model" args="-urdf -unpause -param robot_description -model robot -z 0.0 -J elbow_joint -1.57" respawn="false" output="screen" />

Related: https://answers.ros.org/question/3524...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-10-11 09:41:59 -0500

Seen: 1,867 times

Last updated: Sep 03 '20