pal-robotics / tiago_simulation

http://wiki.ros.org/Robots/TIAGo
Apache License 2.0
33 stars 28 forks source link

odom frame, and package pal_navigation_cfg_public missing #23

Closed jmguerreroh closed 1 year ago

jmguerreroh commented 1 year ago

Hello,

I found two problems in this repo:

Steps to reproduce:

ros2 launch tiago_gazebo tiago_gazebo.launch.py 
ros2 launch tiago_2dnav tiago_nav_bringup.launch.py

This is the output:

[controller_server-4] [INFO] [1681823036.595946691] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[amcl-2] [INFO] [1681823036.630484985] [amcl]: Message Filter dropping message: frame 'base_laser_link' at time 17.892 for reason 'the timestamp on the message is earlier than all the data in the transform cache'

And if you check the TFs,, this is the result:

ros2 run tf2_ros tf2_echo odom base_footprint
[INFO] [1681822604.904872814] [tf2_echo]: Waiting for transform odom ->  base_footprint: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist

Hope you can fix the odom problem in order to use properly the simulation.

Regards!

saikishor commented 1 year ago

Hello @jmguerreroh,

Thank you for bringing it to our attention. We will take a look and get back to you.

Best Regards, PAL Robotics Team.

saikishor commented 1 year ago

Hello @jmguerreroh ,

We have updated the .repos fixing the first issue you pointed out. We will update you further on the second issue in the upcoming days.

Thank you,

Best Regards, PAL Robotics Team.

jmguerreroh commented 1 year ago

Hello @jmguerreroh ,

We have updated the .repos fixing the first issue you pointed out. We will update you further on the second issue in the upcoming days.

Thank you,

Best Regards, PAL Robotics Team.

Hello @saikishor ,

Thank you very much for your quick response. I will wait for the second fix :)

Regards

Noel215 commented 1 year ago

Hello @jmguerreroh,

As a temporal solution for the second issue you can clone navigation2 repository in your workspace and use the previous version, 1.1.5. Please, let us know if that resolves the issue for you.

We'll keep looking for a better solution.

Regards

jmguerreroh commented 1 year ago

Hi @Noel215,

Thank you for your support.

The main problem is that Tiago doesn't publish the odom tf. Nav2 connects map -> odom, so changing the Nav2 version doesn't solve this problem.

Anyway, I tried the 1.1.5 version of Nav2 as you recommended, and it works when Tiago has its odom -> base_footprint transform as expected, but Tiago's odom tf is still randomly published in each execution.

I'll keep waiting for a solution, thank you!

Regards.

Noel215 commented 1 year ago

Hi @jmguerreroh,

The issue was related to the diff_drive_controller of ros2_controllers. I've provided a patch in order to make it work. You can see it in https://github.com/ros-controls/ros2_controllers/pull/585.

Regards.

jmguerreroh commented 1 year ago

Hi @jmguerreroh,

The issue was related to the diff_drive_controller of ros2_controllers. I've provided a patch in order to make it work. You can see it in ros-controls/ros2_controllers#585.

Regards.

Hi @Noel215 ,

I tried this fix but it just works in rolling. I replicate the changes in the humble branch and now works fine.

Thank you for your support!

Regards.

dharanish-nh commented 1 year ago

@jmguerreroh @Noel215

Hello, I am struggling with the above issue. I have managed to clone nav2 in the workspace . But I could not figure out what changes I need to do with ros2_controllers. Now I am restarting the simulation multiple times to get all the frames.

Noel215 commented 1 year ago

Hello @dharanish-nh,

The issue has been backported to humble with this commit: https://github.com/ros-controls/ros2_controllers/commit/0801afa919b3ccef1deda7a674a307c14ad2e741. You can clone the last version of ros2_controllers in your workspace.

Regards.

jmguerreroh commented 1 year ago

@jmguerreroh @Noel215

Hello, I am struggling with the above issue. I have managed to clone nav2 in the workspace . But I could not figure out what changes I need to do with ros2_controllers. Now I am restarting the simulation multiple times to get all the frames.

Hi @dharanish-nh,

Nav2 is not necessary to clone into your workspace, this error is due to ros2_controllers as @Noel215 said.

But if you are using the humble distro, for ros2_controllers currently CI is failing in the humble branch. Meanwhile, you can use this: https://github.com/jmguerreroh/ros2_controllers/tree/humble

Regards.

dharanish-nh commented 1 year ago

Thank you, it works now.