TempleRAIL / drl_vo_nav

[T-RO 2023] DRL-VO: Learning to Navigate Through Crowded Dynamic Scenes Using Velocity Obstacles
https://doi.org/10.1109/TRO.2023.3257549
GNU General Public License v3.0
113 stars 7 forks source link

Implementing an other robot differential robot instead of Turtlebot2 #21

Closed FurkanEdizkan closed 4 months ago

FurkanEdizkan commented 4 months ago

Hello again,

Following up on issue #19, I've implemented a new differential robot using Gazebo plugins for drive, LiDAR, and other functionalities. While training runs successfully, the robot itself remains stationary.

I've confirmed that the scan code feeds correctly into ROS. However, the differential drive plugin isn't receiving any cmd_vel messages. I've examined the code and seen that cmd_vel is often remapped to different topics depending on specific requirements, but I haven't been able to pinpoint the exact topic I need for the "commandTopic" parameter within the differential drive plugin.

Any suggestions for identifying the correct cmd_vel topic?

zzuxzt commented 4 months ago

First, you need to know the control command topic for your robot, e.g. it is '/cmd_vel'. Then, the simplest way is that you can remap the 'cmd_vel' topic from DRL-VO to your control command topic in the launch file drl_vo_inference.launch:

<!-- Mix cmd vel publisher -->
  <node name="mix_cmd_vel" pkg="drl_vo_nav" type="cmd_vel_pub.py" output="screen" >
    <remap from="cmd_vel" to="/cmd_vel"/>
  </node>  
FurkanEdizkan commented 4 months ago

I seems my problem not about DRL-VO but about how kobuki uses it's diff drive plugin and how rest of the related parts function according to it.

I was using libgazebo_ros_diff_drive.so for differential drive for my robots and eventhough all topic remaps and changes are done correctly, compared to original kobuki diff drive plugin inside kobuki_gazebo.urdf.xacro and robot_gazebo package my robots doesn't move. cmd_vel topic published correctly to gazebo however no movement can be seen.

When below part on drl_vo_nav_tarin.launch is commented out robot spawns and can be controlled with cmd_vel

<!-- DRL-VO Control Policy -->
<include
  file="$(find drl_vo_nav)/launch/amr_drl_vo_train.launch">
  <arg name="model_file" value="$(arg model_file)" />
  <arg name="log_dir" value="$(arg log_dir)" />
</include>

So I tryed to play with kobuki_controller however I couldn't managed to make it work initially. Later I found out commandTopic should be /mobile_base/commands/velocity for libgazebo_ros_diff_drive.so However this change doesn't make make robot move again.

I managed to fix it by replacing libgazebo_ros_diff_drive.so or kobuki_controller used inside any robot urdf with libgazebo_ros_planar_move.so with commandTopic=/mobile_base/commands/velocity.

Now code works and training continues, I only see some amcl problems which I will try to fix it next.

However I want to ask if this planner change could effect training code and trained model in any way?

zzuxzt commented 4 months ago

If you can control your robot movement using control commands from the trained model, then in theory replacing the differential driver would not cause too many problems. Just make sure you use the correct control command topic to control the robot's movement.

FurkanEdizkan commented 4 months ago

I still have problems with controller, I really don't know why I can't make robot move with libgazebo_ros_diff_drive.so and kobuki_controller doesn't make robot move either. cmd_vel topics are published correctly and they are remappted to correct topics even all velocity topics working and gazebo listens to correct cmd_vel topic but no movement can be observed eventhough cmd_vel is non zero. Only with libgazebo_ros_planar_move.so make robot move and it has it's own problems :sweat:.

But I don't think there are any other thing related to DRL-VO which I couldn't understand. All my problems are about controller it seems I will try to fix it and post the solution so anyone who faces same issue can solve it however till then I will close this issue

Thank you