0
$\begingroup$

Gazebo Answers logo

Hello,

I tried to build the diffdrive robot by reference to ros_ign_gazebo_demos. But I can not move it.

Below is the launch file.

test_description_publisher.launch.py

Below is robot URDF.

test.urdf.xacro.model

I realize that "ign sdf -p test.urdf > test.sdf" change the URDF to the SDF without tag. Below is robot SDF.

test.sdf.model

I think that is why my robot dont move. How can I get correct SDF?


Originally posted by M-Hijikata on Gazebo Answers with karma: 16 on 2021-03-25

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

I misunderstood that tag can not be used in the ignition gazebo.

In the URDF, the diffdrive plugin is written like below.

<gazebo>
  <plugin
    filename="libignition-gazebo-diff-drive-system.so"
    name="ignition::gazebo::systems::DiffDrive">
    <left_joint>left_wheel_joint</left_joint>
    <right_joint>right_wheel_joint</right_joint>
    <wheel_separation>1.2</wheel_separation>
    <wheel_radius>0.4</wheel_radius>
    <odom_publish_frequency>1</odom_publish_frequency>
    <topic>cmd_vel</topic>
  </plugin>
</gazebo>

I can move my robot with the ignition's topic like below.

ign topic -t "/cmd_vel" -m ignition.msgs.Twist -p "linear: {x: 0.5}, angular: {z: 0.05}"

Thanks.


Originally posted by M-Hijikata with karma: 16 on 2021-03-26

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.