how does the gazebo_ros_skid_steer_drive plugin make robot move
I am new to gazebo.I have searched the question in here and anwser.ros ,but I don't find the anwser. I will be very sorry for the repeating if there is already an explanation.
Recently I meet a strange problem.I design a four-wheels car and want to make it move by the gazeborosskidsteerdrive plugin.Everything is right,but the linear velocity.
When I input the command:
rostopic pub cmdvel geometrymsgs/Twist -r 3 -- '[2.0,0.0,0.0]' '[0.0, 0.0, 0.0]'
I find my car move to the reverse direction . Namely if I want it move forward,it will move back(^^#).
my xacro file about the move is:
<joint name="basetowheel1" type="continuous">
<parent link="baselink"/>
<joint name="base_to_wheel2" type="continuous">
<axis xyz="0 0 1" />
<limit effort="100" velocity="100" />
<parent link="base_link"/>
<child link="wheel_2"/>
<origin rpy="1.5707 0 0" xyz="-0.1 0.15 0"/>
</joint>
<joint name="base_to_wheel3" type="continuous">
<parent link="base_link"/>
<axis xyz="0 0 1" />
<child link="wheel_3"/>
<origin rpy="1.5707 0 0" xyz="0.1 -0.15 0"/>
</joint>
<joint name="base_to_wheel4" type="continuous">
<parent link="base_link"/>
<axis xyz="0 0 1" />
<child link="wheel_4"/>
<origin rpy="1.5707 0 0" xyz="-0.1 -0.15 0"/>
</joint>
<gazebo>
<plugin name="skid_steer_drive_controller" filename="libgazebo_ros_skid_steer_drive.so">
<alwaysOn>true</alwaysOn>
<updateRate>100.0</updateRate>
<robotNamespace>/</robotNamespace>
<leftFrontJoint>base_to_wheel1</leftFrontJoint>
<rightFrontJoint>base_to_wheel3</rightFrontJoint>
<leftRearJoint>base_to_wheel2</leftRearJoint>
<rightRearJoint>base_to_wheel4</rightRearJoint>
<wheelSeparation>0.2</wheelSeparation>
<wheelDiameter>0.1</wheelDiameter>
<torque>2</torque>
<commandTopic>cmd_vel</commandTopic>
<robotBaseFrame>base_link</robotBaseFrame>
<broadcastTF>1</broadcastTF>
</plugin>
</gazebo>
I check my wheel and confirm that the front wheel joint and the rear joint are all right.Finally I find if I change the wheel joint's origin rpy to "-1.5707 0 0",the movement become right.
origin rpy="1.5707 0 0" xyz="-0.1 0.15 0" ------->> origin rpy="-1.5707 0 0" xyz="-0.1 0.15 0"
I guess the gazeborosskidsteerdrive plugin make my car move forward through making the joint rotate. So I change the joint's roll , the move direction can be changed.But I couldn't find any file to confirm my suppose.Is there any explanation for the gazeborosskidsteerdrive plugin?
Asked by starcosmos on 2019-05-07 06:45:44 UTC
Comments