ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

libgazebo_ros_skid_steer_drive syntax for URDF in ROS2?

asked 2021-12-17 07:26:54 -0600

knuttu gravatar image

updated 2022-02-11 11:17:17 -0600

lucasw gravatar image

Hi! I'm fairly new to gazebo, robot modelling and plugins, and I'm now trying to make a small 4wd rover, but I have some problems with the plugins. I'm not able to make the libgazebo_ros_skid_steer_drive plugin work in my urdf file in ROS2, and I get the following error msg:

[gazebo-1] [Err] [Plugin.hh:212] Failed to load plugin libgazebo_ros_skid_steer_drive.so: libgazebo_ros_skid_steer_drive.so: cannot open shared object file: No such file or directory

This is what I have tried to put in my urdf file, but it is only a copy from the sdf version found in gazebo-ros-pkg. I have tried other syntax versions aswell, but with no luck.

    <gazebo>
    <plugin name="two_wheeled_robot_diff_drive" filename="libgazebo_ros_skid_steer_drive.so">
    <ros>
      <namespace>/demo</namespace>
      <remapping>cmd_vel:=cmd_demo</remapping>
      <remapping>odom:=odom_demo</remapping>
    </ros>

    <!-- Number of wheel pairs -->
    <num_wheel_pairs>2</num_wheel_pairs>

    <!-- wheels0 -->
    <left_joint>left_wheel_joint0</left_joint>
    <right_joint>right_wheel_joint0</right_joint>

    <!-- wheels1-->
    <left_joint>left_wheel_joint1</left_joint>
    <right_joint>right_wheel_joint1</right_joint>

    <!-- kinematics -->
    <wheel_separation>1.25</wheel_separation>
    <wheel_separation>1.25</wheel_separation>

    <wheel_diameter>1.0</wheel_diameter>
    <wheel_diameter>0.6</wheel_diameter>

    <!-- limits -->
    <max_wheel_torque>20</max_wheel_torque>
    <max_wheel_acceleration>1.0</max_wheel_acceleration>

    <!-- output -->
    <publish_odom>true</publish_odom>
    <publish_odom_tf>true</publish_odom_tf>
    <publish_wheel_tf>true</publish_wheel_tf>

    <odometry_frame>odom_demo</odometry_frame>
    <robot_base_frame>chassis</robot_base_frame>
     <plugin>
    <gazebo>

I have installed ros-foxy-gazebo-ros-pkgs and I can make the libgazebo_ros_diff_drive plugin work. Can anyone help me to fix the problem?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-12-17 15:38:34 -0600

knuttu gravatar image

So it turns out that the libgazebo_ros_skid_steer_drive plugin was replaced with the libgazebo_ros_diff_drive plugin from ROS1 to ROS2. In other words, the parameters in my file were right, but the filename wasnt. When I changed it to

filename="libgazebo_ros_diff_drive.so">

it worked perfectly.

edit flag offensive delete link more

Comments

1

Glad it worked. Thank you for sharing your answer

osilva gravatar image osilva  ( 2021-12-20 07:07:09 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2021-12-17 07:26:54 -0600

Seen: 1,359 times

Last updated: Dec 17 '21