Gazebo | Ignition | Community
Ask Your Question

spawn_model initial positions are temporary

asked 2019-02-28 11:12:47 -0500

mogumbo gravatar image

I'm launching my robot with:

<node name="lander_model" pkg="gazebo_ros" type="spawn_model" output="screen"
args="-urdf -param robot_description -model lander -J j_shou_yaw -1.5708
-J j_shou_pitch 1.5708 -J j_prox_pitch -2.7 -J j_dist_pitch 3" />

The model starts with joints set to the initial positions I specified with -J, but they immediately spring back to their origin poses as described in my URDF. Each of my joints is wired up with an effort_controllers/JointPositionController. Is there a way to get these joints to hold the specified initial positions? I don't want them to move until I command their controllers.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-22 12:53:51 -0500

mogumbo gravatar image

The only solution I have found is to start gazebo paused and then use spawn_model's -unpause option to unpause it. This apparently delays some functions of Gazebo such that controllers absorb the specified joint positions instead of starting at zero.

I found this solution here: This is very hacky, and it would be great if there was a more elegant solution. Does anyone have any idea how to improve this?

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-02-28 11:12:47 -0500

Seen: 850 times

Last updated: Mar 22 '19