libSimpleTrackedVehiclePlugin.so ROS support workflow

asked 2020-12-03 10:26:17 -0500

gmetts gravatar image

Hello,

I am attempting to control a tracked robot through ROS using the gazebo-9 plugin 'libSimpleTrackedVehiclePlugin.so'. I am having a bit of an issue finding any sort of concise documentation for implementation of this plugin, other than the 'tracked_vehicle_simple.world' example implementation, which does not implement ROS control. I do not think there is an implementation difference between gazebo-9 and gazebo-11 but I may be mistaken. I have a few ROS Melodic dependencies in my codebase that requires I use gazebo-9 for compatibility through the current recommendations.

In the example implementation the plugin is initiated with the following code.

        <plugin filename="libSimpleTrackedVehiclePlugin.so" name="simple_tracked_vehicle">
            <body>base_link</body>
            <left_track>left_track</left_track>
            <right_track>right_track</right_track>
            <left_flipper>front_left_flipper</left_flipper>
            <left_flipper>rear_left_flipper</left_flipper>
            <right_flipper>front_right_flipper</right_flipper>
            <right_flipper>rear_right_flipper</right_flipper>
            <track_mu>2</track_mu>
            <track_mu2>0.5</track_mu2>
        </plugin>

        <plugin filename="libKeysToCmdVelPlugin.so" name="keyboard_control">
            <publish_as_twist>true</publish_as_twist>
            <cmd_vel_topic>~/simple_tracked/cmd_vel_twist</cmd_vel_topic>
        </plugin>

I have a bit of confusion on a few key aspects of this implementation. First, my implementation does not have any "flippers" and I am unsure of how integral these flippers are to this plugin. Are they optional? Second, the drive options that have built in ros support such as 'libgazebo_ros_skid_streer_drive.so' allow for the command and odometry topic configuration using the <commandtopic> and <odometrytopic> tags. I would like to do something similar with this plugin, but am unsure of the workflow. Would this be possible using xacro/sdf configurations or would it require editing the .cc .hh source code and compiling a modified version of the plugin? I am interested in learning how to code customs plugins, but I don't quite have a strong enough grasp on the codebase and .sdf interaction in the plugins in order to start. I know gazebo tutorials have some resources, but I would appreciate some guidance or insight to the gazebo development learning process. I have some future implementations that would require me to learn this eventually anyways.

In particular, I could use some insight into how to properly implement the transport library for use with ROS. I think that I may understand from comparing the .cc source code for track systems vs diff drive/skid steer differences, but some additional guidance that doesn't come from me attempting to reverse engineer code would be nice. I can't find documentation on the tutorial site for it, but I may be missing something.

Thank you in advance,

Grant

edit retag flag offensive close merge delete