Robotics StackExchange | Archived questions

How to configure tracked vehicles in gazebo

Hello, I am working on a project about tracked vehicles, and then I found the ‘trackedvehiclesimple.world’ file about tracked vehicles in gazebo-9. After I ran this example, the tracked vehicle can be controlled by the keyboard, but I did not find any ‘~//cmdvel’ or ‘~/simpletracked/cmdveltwist’ topic mentioned in the file. This is the result I got by using the ‘topic list’ command after running ‘trackedvehiclesimple.world’ in gazebo-9:

/clock /gazebo/linkstates /gazebo/modelstates /gazebo/parameterdescriptions /gazebo/parameterupdates /gazebo/setlinkstate /gazebo/setmodelstate /gazebogui/parameterdescriptions /gazebogui/parameterupdates /rosout /rosout_agg

Here are my questions: 1. Why can't I find the topic mentioned in the file ? Is there something wrong? 2. Can the ‘libSimpleTrackedVehiclePlugin.so’ or ‘libTrackedVehiclePlugin.so’ plugin control the speed of the left and right tracks separately? If it can, how can I configure it. It would be great if there was an example. 3. Can ‘libSimpleTrackedVehiclePlugin.so’ or ‘libTrackedVehiclePlugin.so’ be used in xacro files?

I want to verify my algorithm to control the speed of the left and right tracks of my tracked vehicle separately. In order to configure the tracked vehicle in gazebo, I have made a lot of efforts, but the relevant information that can be found is too few. If there is already a plug-in in gazebo that can realize the function I want, I would be very grateful. If there is not a perfect plug-in for this function, I hope you can tell me. Looking forward to your reply.

Asked by oric97 on 2020-09-15 07:27:05 UTC

Comments

Answers

Not sure if you still need help but

  1. You can't see the topic because it's being communicated within Gazebo, not on ROS, you'd have to have it subscribe to a ROS topic by modifying the tracked vehicle plugin (see source code here: https://github.com/osrf/gazebo/blob/gazebo9/plugins/TrackedVehiclePlugin.cc)
  2. It does all of that internally so it'd have to be modified to set the track speeds based on your topic, not internally based on cmd_vel
  3. It can be added to a xacro file like a normal gazebo plugin

If you want something to simulate the physics of tracks this is probably the best plugin there is for gazebo, otherwise, you can just use wheels and something like a diff_drive_controller and modify that.

Asked by kronosgreen on 2020-12-10 11:26:30 UTC

Comments