Gazebo | Ignition | Community
Ask Your Question
0

Ignition Gazebo: Cannot Use Diffdrive from URDF

asked 2021-03-25 02:12:27 -0600

M-Hijikata gravatar image

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 <plugin> tag. Below is robot SDF.

test.sdf.model

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-03-26 22:59:36 -0600

M-Hijikata gravatar image

I misunderstood that <gazebo> 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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-03-25 02:12:27 -0600

Seen: 185 times

Last updated: Mar 26