Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Online example is not working on ros2 jazzy #4722

Open
davidemannone opened this issue Oct 15, 2024 · 5 comments
Open

Online example is not working on ros2 jazzy #4722

davidemannone opened this issue Oct 15, 2024 · 5 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@davidemannone
Copy link

Bug report

Cannot bring to work the "Getting Started" example on Ros2 Jazzy with Ubuntu 24.04, in both binary and source version (even if compilation completes successfully). Logs reports tf frames missing (odom), maps errors and rviz crashs after few seconds, and command terminates execution.
As stated I tried first not to install "sudo apt install ros-jazzy-turtlebot3-gazebo", after trying it apt cannot find it and last, even install all of tb3 and also tb4, will not solve the question. Cannot find this path: export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/jazzy/share/turtlebot3_gazebo/models

What should I do to make your example working?

  • Operating System:
    • Ubuntu 24.04 -->
  • ROS2 Version:
    Jazzy, binary
  • Version or commit hash:
    Nav2 binaries got as written on your site (using jazzy), same for source
  • DDS implementation:
    Fast-RTPS

Steps to reproduce issue

Followed your simple and clear guide and when launched it didn't work

Expected behavior

The same as web page

Actual behavior

Starts, rviz closes after few seconds followed by console execution stop. Gazebo remains running

Additional information

Logs reports tf frames missing and rqt and tftree doesn't shows all expected connections

component_container_isolated_88025_1729002265308.log

@SteveMacenski
Copy link
Member

SteveMacenski commented Oct 15, 2024

So, it looks like our Getting Started (and build/install) guide needs to be updated from the migration to New-Gazebo from Gazebo-Classic. Jazzy / Rolling don't have support for Gazebo Classic anymore since it doesn't ship with those distributions on 24.04.

We are no longer dependent on the TB3 packages and instead use this repo instead for the URDFs and sim files https:/ros-navigation/nav2_minimal_turtlebot_simulation. That step is not required to apt install anything other than packages in the minimal Tb3/4 repo -- which have binaries in Jazzy that you can use. The setting of the Gazebo model paths are also not required anymore (we automated that in the launch files).

Everything else should be the same. If you're open to contributing, I'd love it if you could propose the changes to that instruction set that aligns with the current state of the project using the modern updated gazebo! If nothing else, verifying that the changes i described above are the only changes required would be good and then I can make the updates myself when I have a spare few hours in the airport on the way to ROSCon :-)

@SteveMacenski SteveMacenski added bug Something isn't working good first issue Good for newcomers labels Oct 15, 2024
@davidemannone
Copy link
Author

I'm a novice in Ros2 and Nav2, so I don't have enough confidence and experience yet to make this. But i did some tries and these are the results.

I've installed Ros2 Jazzy following the guide and it comes already with with Gazebo installed too. I had a look to the version and it was Harmonic. I don't know if it is old (classic) or new one and having a search for something new it seems that a new version of Gazebo should be Ignition but I cannot find it (all brings to Gazebo: https://ignitionrobotics.org/). I've found finally this site: https:/gazebosim/ros_gz/tree/jazzy and followed the instructions for install it. After that, Gazebo is still running (using the gz sim commands, as before: just the nav2 example did not run) , but not with ing gazebo.
Having a further look I found this https://gazebosim.org/docs/latest/getstarted/ and here https://gazebosim.org/docs/ionic/install_ubuntu/ I found I should use Ionic. Following also this I got all installed correctly and gz is still running but it reports always harmonic. If I do a check with apt for ros-jazzy-gz-ionic and ros-jazzy-gz-harmonic both says they are updated. Maybe there both installed now and gz sim refers just to one? Having a look in opt/ros/jazzy.. /opt, /lib and /share I can find only "gz" (in files or links) and no versions (folders or in names).

I've got the nav2_tb repo you suggested and it compiles. I don't know where to place it correctly: if part of all the other nav2's (inside the suggested nav2_ws/src/navigation2) or elsewhere like the nav2_ws/src. In both cases it compiles well and not doing anything else (not even the exports as you suggested) just sourcing nav2_ws (for the nav2_ws/src/navigation2 or both separate for nav2_ws/src) it still is not running and rviz dies as before.

I trust in your spare airport hours. :)

@SteveMacenski
Copy link
Member

SteveMacenski commented Oct 16, 2024

Jazzy only supports / ships with the new Gazebo. Ignition is an older naming schema which is deprecated due to trademark issues. its all just called 'Gazebo' now - not confusing at all, right? 😉 So you're definitely using new-Gazebo (or as I jokingly call it sometimes: Gazebo2).

You shouldn't need to download + build the code unless you're on Rolling. You should be able to apt install those packages instead on Jazzy. Please verify that this works for you. At that point, you should just be able to run all the Nav2 demos in nav2_bringup without issue

Let me know :-)

@davidemannone
Copy link
Author

It sounds good, but it still wont work.
sudo apt install ros-jazzy-navigations2 --> all up to date
sudo apt install ros-jazzy-nav2-minimal-tb* --> installed ..tb3-sim, ..tb4-sim, tb4-description
source /opt/ros/jazzy/setup.bash --> ok
ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False --> as ever: tf errors, rviz starts and closes, gazebo ok with model
ros2 launch nav2_bringup tb4_simulation_launch.py headless:=False --> as ever: tf errors, rviz starts and closes, gazebo with model (warehouse)
Attached the entire log folder, clean, with just the startup.
logs.zip

@SteveMacenski
Copy link
Member

SteveMacenski commented Oct 17, 2024

available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist

That's usually related to gazebo as the publisher of the odometry data and frames - if you wait for the gazebo window to appear, do you still see these errors afterwards? It can take a moment for gazebo to fully load, especially on the first run while it downloads online mesh assets used in the SDF file

[INFO] [1729186852.719004091] [rclcpp]: signal_handler(signum=2)

I'm seeing you likely sending a control+c or similar signal to end the program around that time while waiting for things to finish hooking up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants