Drive plugins - Set correctly for specific urdf model

Hi again @duckfrost, @staff I successfully applied the TEB local planner for my modified Prius…however just the planner is calculated… I am facing 3 issues here:

1 - The AMCL is not working properly because it is like have 2 cars in the simulation, one ghost that stays binking in the wrong position, and the AMCL point cloud indicates it is there (but it is not). And the same car flashing in the real position, but the AMCL is not near it.

Maybe the issue is that I mapped the environment and later launche the move_base node wich shrinked the AMCL node with the map_server already done (loaded again over this one in Rviz). It is the same map, however maybe this is causing the 2 ghosts…I am not sure.

2- The TEB calculates 2 planners: 1 planner to go from the ghost wrong position car to the ghost blinking right position frame (or inverse, I am not sure). And also another planner for the spot I indicated using the icon NAV_GOAL in Rviz. It displays in the same time these 2 trajectories in Rviz and the car becomes stuck. In the image is possible to see 2 purples lines linking the false-car position to the goal…and another linking the right_car frame position to the false_car position frame…

3- The car does not move, just the direction obeys the planner direction. If the planner indicates left direction the car turns the wheels to left…and right if the planner calculates right. However it does not throtle…I don’t know why (just using the keyboard command…not autonomously).
I thought that this was an issue of occupied cells at first.Then later I realized that was not, because I used a Costmap Conversion params to the move_base node ( I had previously a information that the cells were being considered busy because I did not have a costmap coversion)…

I verified the prius/cmd_vel topic and nothing is published on it…I also tried to publish manually on it, but the car did not move. Maybe another topic is responsible to move the car, and I can not recognize, because I tried already to understand the prius_keyboard teleop script but I could not see a topic it publishes…just “throttle” and “turn”, however I am not sure this is a topic.
I have used the script teached in lesson 4 of this module to convert cmd_vel to ackermann msg type. It worked, however it seems that the car does not have this topic in its urdf…

So maybe I should use the ackermann plugin instead of diff drive. But I need using the the diff drive becuase of the odom frame it generates or not?

So I can’t understand why the car does not start accelerating. Maybe be the original modification I did, that I used the diff_drive plugin to add an Odom frame to the car, in order for the gmapping node works properly, considering that this node requires an odom to make the transformation - base_footprint-odom-map…? Or not? I have seen you have written me about the ackermann. I still did not finish the last module from ROS for Autonomous Vehicles. Just finished the TEB modules today. Do you think changing this plugin the things will work, or this exist another issue affecting the car navigation? And more one question the Ackermann plugin is teached in the ROS 101 for autonomous vehicles? The next module?

Well I have taken a look in how to use the Ackermann drive plugin. But I am not sure how to use it…could you provide a tutorial or video how to do that? There are different ways to be used according to internet https://github.com/aurofable/ros/blob/master/urdfPractice/car.urdf and https://github.com/ros-simulation/gazebo_ros_pkgs/pull/947

I am little confused. I think I need to remove the diff_drive plugin and add the ackermman plugin. However it seems that prius has already its plugin: “The Hybrid drive…”. So I am confused how to make the car moves using the right plugin…what should I try at first?

Thanks in advance

Hi,

Same as the answer I gave you on another question,
Please create a ROSject, into a git if possible, so that anyone can help you to debug the simulation in ROSdevelopementstudio.

Create it and that way I will be able to go deeper in you rissue.

1 Like

ok @duckfrost sorry for the delaying of answer I was too busy with the project last weeks. I will try put the simulations on ROS Ject, however they are pretty have. Do I need to upgrade in order to access a more powerful machine for the experts help me debug the errors? Or can I just use the standard one of my basic package which I signed in?
I am not sure if you can inside your office debug with better machines or just with the virtual machine assigned with my account, which I can put the pkgs. So let me know if an upgrade is required for that. Thanks!