[ros-users] Unexpected behavior from Gazebo when using SetModelConfiguration

cameronlee at berkeley.edu cameronlee at berkeley.edu
Wed Jul 18 05:26:04 UTC 2012

I am using gazebo_msgs/SetModelConfiguration.srv to move a PR2 arm through
a path in Gazebo. For the past few months, it has worked fine, but
recently (within the last week or two), I have run into some unexpected
behavior. When I try to set the position of one arm, the PR2 seems to try
to go back to an initial state (both arms get reset) before moving to my
specified position. Specifying the joint configurations of both arms in a
service call seems to solve this problem. In either case, each time I call
the service, the PR2 also seems to shift around like it is in collision
with something. When I try to move an arm through a path in small steps,
the shifting is more prominent, and the robot eventually just falls
through the floor. Does anyone have an idea of what could be happening?

I am turning off the controllers before making the service call, so that
shouldn't be the problem.

Here is the code I am using:
set_model_config_client =
req = SetModelConfigurationRequest()
req.model_name = "pr2"
req.urdf_param_name = "robot_description"
req.joint_names = rospy.get_param("/%s/joints" % ("r_arm_controller"))
req.joint_positions = angles
res = set_model_config_client(req)

*angles is the list of joint angles specifying the position of the right arm

Thank you,

More information about the ros-users mailing list