Issue with libSimpleTrackedVehiclePlugin and ROS control

asked 2021-01-05 13:21:36 -0500

Ludoenso gravatar image

updated 2021-01-07 09:08:54 -0500

What I'm trying to achieve and what I think might be the issue


I'm currently working on the simulation of my student club's tracked robot (Markhor) with Gazebo 9.16 and ROS Melodic. I want to be able to send cmd_vel through the network to a ROS control diff_drive controller and make the robot move.

My issue is, when trying to control a robot using libSimpleTrackedVehiclePlugin, it seems like it doesn't communicate between the ROS controller and the track. This results in the robot not moving.

Also when I'm using the libKeysToCmdVelPlugin the robot moves but I don't want to control it through Gazebo.

I tried to isolate the issue and tested Clearpath's Husky repository which is using the same type of ROS control controller and it worked. Then I tried replacing the tracks on my robot with the wheels used on the husky and it worked.

So now I'm trying to figure out why our robot with the libSimpleTrackedVehiclePlugin is not moving. Since the same ROS control setup works with the husky wheel, I suspect that it might be something with the libSimpleTrackedVehiclePlugin.

How to replicate the issue

Download & packages installation

The repository needs to be inside a workspace. So you might want to create a repository and a src folder:

mkdir -p markhor_ws/src

cd markhor_ws/src

The repository of our robot can be found here:

You just need to download it and place it inside the src folder we just created. Also, the code for this feature is inside the branch diff_drive.

git clone

cd markhor

git checkout diff_drive

Once this is done, you can download the dependencies with this command inside the markhor_ws folder:

cd ../..

rosdep install --from-paths src --ignore-src -r -y

Once all the downloads are done, we compile the project, by simply running the catkin_make command inside the markhor_ws folder.

Now we should be good to test for the issue.

Markhor robot with the husky wheels

First, inside a terminal we need to source the projet source devel/setup.bash Then we want to launch the simulation (make sure it is sourced with the project setup script):

roslaunch markhor_gazebo test_world_husky.launch

Then in a second terminal, we need to launch a cmd_vel node publisher:

rosrun teleop_twist_keyboard cmd_vel:=/markhor/diff_drive_controller/cmd_vel Now if you try to use this terminal to move the robot with your keyboard it should move relatively slowly.

Also, everything inside the repository, that has the suffix "_husky" means that it was adapted to use the husky wheels for the simulation.

Markhor robot with the libSimpleTrackedVehiclePlugin tracks

Same thing as for the Markhor robot with the husky wheels, but we only change the launch file name. If you didn't try the simulation with the husky wheels you might need to source the workspace here.

roslaunch markhor_gazebo test_world.launch

Then in a second terminal, we need to launch a cmd_vel ... (more)

edit retag flag offensive close merge delete