Robotics StackExchange | Archived questions

How can I initialize the joint position of a revolue2 joint?

Hello, I encounter some problems when I try to initialize the joint position of a revolue2 joint.

I use the -J parameter of 'spawn_model' node in the launch file to set the specified joint to a wanted position.

The problem is: the joint type was 'revolute2', so I can not figure out how to specify the position of each DoF of the joint. I've tried script like<node pkg="gazebo_ros" type="spawn_model" name="model" args="-sdf -model pendulum -param robot_description -J base_link2link_link 0.1 0.1" />, but that doesn't work.

The definition of my joint in the .sdf file is like: <joint name='base_link2link_link' type='revolute2'> <pose relative_to='base_link'>0 0 0 0 -0 0</pose> <parent>base_link</parent> <child>link_link</child> <axis> <xyz>1 0 0</xyz> <limit> <lower>-1e+16</lower> <upper>1e+16</upper> </limit> </axis> <axis2> <xyz>0 1 0</xyz> <limit> <lower>-1e+16</lower> <upper>1e+16</upper> </limit> </axis2> </joint>

Asked by Fran on 2023-04-23 09:00:14 UTC

Comments

Answers