ntnu-arl / gbplanner_ros

Graph-based Exploration Planner for Subterranean Environments
BSD 3-Clause "New" or "Revised" License
648 stars 147 forks source link

Backward direction #23

Open JamesFlosse opened 2 years ago

JamesFlosse commented 2 years ago

Hi, this project it's really cool but i have one problem, i set up gbplanner on real ugv and my problem is that the real robot goes 80% of the time in backward. How can modify this for the robot drive in forward direction?

MihirDharmadhikari commented 2 years ago

Hello,

Thank you for the question. Currently, the simulation demo uses this pure pursuit path tracker. This assumes that the robot can go in both directions identically. So currently there is no direct solution to make it go forward. However, this part of the path tracker handles the switch between forward and backward path following where it sets the linear velocity to be negative and switches the direction of the angular velocity. If you want you can modify this such that the linear velocity is always positive and the robot will turn on the spot to face the path. If you always set this parameter to 1 and comment out this part, it should work. I haven't tested this but you can give it a try.

Let me know if this helps.

Best, Mihir

JamesFlosse commented 2 years ago

Thanks for you fast reply, i try next day this modification ;).

JamesFlosse commented 2 years ago

Hi again, it's work fine thx. I have some question the first, in your wiki, for the x y z sensor position, you "robot's odometry frame". This is base_link? or base_footprint?

MihirDharmadhikari commented 2 years ago

Hi, Happy to hear that it helped. Regarding your question, the frame should be the one that the odometry solution calculates. The same odometry that you feed to the planner. In case of the SMB in the simulation it is the base_link.

JamesFlosse commented 2 years ago

Ok, because in simulation, when i setup x y z and rotation according to the base_link for the sensor (one VLP16), and setup xyz dimension robot size, i set up the robot_height and max_ground_height, the robot enter in colision with environment.

MihirDharmadhikari commented 1 year ago

Hi @JamesFlosse ,

If you visualize the vis/robot_state topic you will see the bounding box that the planner uses for collision checking (the green one is the correct one). Check if this appears at the correct location.

Best, Mihir