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

Jonathan Bohren jonathan.bohren at gmail.com
Wed Jul 18 08:14:12 UTC 2012


Cameron,

You'd probably get more help by posting a question on
http://answers.ros.org, or asking the gazebo mailing list directly:

https://kforge.ros.org/mailman/listinfo/gazebo-list

-j

On Wed, Jul 18, 2012 at 7:26 AM,  <cameronlee at berkeley.edu> wrote:
> Hi,
> 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 =
> rospy.ServiceProxy("/gazebo/set_model_configuration",
> SetModelConfiguration)
> 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
> rospy.wait_for_service("/gazebo/set_model_configuration")
> res = set_model_config_client(req)
>
> *angles is the list of joint angles specifying the position of the right arm
>
> Thank you,
> Cameron
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users



-- 
Jonathan Bohren
PhD Student
Dynamical Systems and Control Laboratory
Laboratory for Computational Sensing and Robotics
The Johns Hopkins University

(707) 520-4736
jbo at jhu.edu



More information about the ros-users mailing list