Quantcast
Viewing all articles
Browse latest Browse all 7017

Gazebo object spawned in robot link frame does not move with robot link

ROS Indigo on Ubuntu 14.04 with Gazebo 7.3 and Python 2.7 I use a Gazebo service to spawn a fixed object in a link reference frame, but the object remains fixed with respect to the world instead of with respect to the frame. Why is this so? Here is the `rospy` code: def test_robot_attachment(): """ Try attaching an axes model to a robot frame and see what happens """ global attachCounter spawn_model_prox = rospy.ServiceProxy('gazebo/spawn_sdf_model', SpawnModel) # Get a handle to the Gazebo model spawner modelPath = rospack.get_path('grasp_anything') + '/urdf/block_axes.urdf' # Build a path to the model URDF f = open(modelPath,'r') # Open the URDF for reading sdff = f.read() # and read it rospy.wait_for_service('gazebo/spawn_sdf_model') # Wait for the model loader to be ready targetPose = ROS_geo_pose_from_lists( [ 0.5 , 0.5 , 0.5 ] , [0,0,0,1] ) spawn_model_prox("axesAttached" + str(attachCounter), sdff, "robotos_name_space", targetPose, "lbr4_allegro::lbr4_7_link") # gen model name and place the axes at the specfied pose attachCounter += 1 Is there a way to attach a model to a moving frame such that it moves with the frame but is static within the frame itself? As you can see below, the URDF being inserted has no collision geometry, the model is set to static, and gravity is turned off for the model. Here is "block_axes.urdf": Gazebo/RedGazebo/GreenGazebo/Bluetruetrue

Viewing all articles
Browse latest Browse all 7017

Trending Articles