-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ROS Jazzy support #6378
base: master
Are you sure you want to change the base?
ROS Jazzy support #6378
Conversation
0bcfaad
to
512a6fa
Compare
.. tab:: Jazzy | ||
|
||
.. code-block:: bash | ||
|
||
cd ~/ardu_ws | ||
vcs import --input https://raw.githubusercontent.com/ArduPilot/ardupilot_gz/main/jazzy_gz.repos --recursive src | ||
|
||
.. tab:: Humble | ||
|
||
.. code-block:: bash | ||
|
||
cd ~/ardu_ws | ||
vcs import --input https://raw.githubusercontent.com/ArduPilot/ardupilot_gz/main/humble_gz.repos --recursive src |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for ardupilot_gz
, we could separate branches Jazzy
and Humble
, but since most of the development team is still on Humble
that might cause headaches syncing the two branches. Simply having two .repos
files is proposed instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with either approach. In a few other repos in Github, I started using mergify.io, so the work to maintain multiple branches is very low.
.. group-tab:: ArduPilot 4.6 and later | ||
|
||
.. code-block:: bash | ||
|
||
source /opt/ros/humble/setup.bash | ||
source /opt/ros/$ROS_DISTRO/setup.bash | ||
cd ~/ardu_ws/ | ||
colcon build --packages-up-to ardupilot_sitl | ||
source install/setup.bash | ||
ros2 launch ardupilot_sitl sitl_dds_udp.launch.py transport:=udp4 refs:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/dds_xrce_profile.xml synthetic_clock:=True wipe:=False model:=quad speedup:=1 slave:=0 instance:=0 defaults:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/copter.parm,$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/dds_udp.parm sim_address:=127.0.0.1 master:=tcp:127.0.0.1:5760 sitl:=127.0.0.1:5501 | ||
|
||
ros2 launch ardupilot_sitl sitl_dds_udp.launch.py transport:=udp4 synthetic_clock:=True wipe:=False model:=quad speedup:=1 slave:=0 instance:=0 defaults:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/copter.parm,$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/dds_udp.parm sim_address:=127.0.0.1 master:=tcp:127.0.0.1:5760 sitl:=127.0.0.1:5501 | ||
|
||
.. group-tab:: ArduPilot 4.6 and later | ||
.. group-tab:: ArduPilot 4.5 | ||
|
||
.. code-block:: bash | ||
|
||
source /opt/ros/humble/setup.bash | ||
source /opt/ros/$ROS_DISTRO/setup.bash | ||
cd ~/ardu_ws/ | ||
colcon build --packages-up-to ardupilot_sitl | ||
source install/setup.bash | ||
ros2 launch ardupilot_sitl sitl_dds_udp.launch.py transport:=udp4 synthetic_clock:=True wipe:=False model:=quad speedup:=1 slave:=0 instance:=0 defaults:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/copter.parm,$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/dds_udp.parm sim_address:=127.0.0.1 master:=tcp:127.0.0.1:5760 sitl:=127.0.0.1:5501 | ||
ros2 launch ardupilot_sitl sitl_dds_udp.launch.py transport:=udp4 refs:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/dds_xrce_profile.xml synthetic_clock:=True wipe:=False model:=quad speedup:=1 slave:=0 instance:=0 defaults:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/copter.parm,$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/dds_udp.parm sim_address:=127.0.0.1 master:=tcp:127.0.0.1:5760 sitl:=127.0.0.1:5501 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes the tab order so that ArduPilot's newest version appears first. Seems intuitive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree on that change! Now that 4.6 is in beta.
@@ -17,49 +17,59 @@ Prerequisites | |||
|
|||
- Learn to use ArduPilot first by following the relevant wiki for `Rover <https://ardupilot.org/rover/index.html>`__, `Copter <https://ardupilot.org/copter/index.html>`__ or `Plane <https://ardupilot.org/plane/index.html>`__. | |||
- In particular, make sure the vehicle works well in Manual and Autonomous modes like Guided and Auto before trying to use ROS. | |||
- Learn how to use ROS 2 by reading the `beginner tutorials <https://docs.ros.org/en/humble/Tutorials.html>`__. In the case of a problem with ROS, it is best to ask on ROS community forums first (or google your error). | |||
- Learn how to use ROS 2 by reading the `beginner tutorials <https://docs.ros.org/en/rolling/Tutorials.html>`__. In the case of a problem with ROS, it is best to ask on ROS community forums first (or google your error). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to use ROS Rolling
when linking to generic documentation. Since we now support multiple ROS 2 versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, can you add a note to select the right version in the dropdown?
Before anything else, make sure that you have `sourced your ROS 2 environment <https://docs.ros.org/en/humble/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#source-the-setup-files>`__ | ||
and check if it is `configured correctly <https://docs.ros.org/en/humble/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#check-environment-variables>`__. | ||
|
||
Finally, ensure you have `set up your ArduPilot build environment <https://ardupilot.org/dev/docs/building-the-code.html#setting-up-the-build-environment>`__. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a pain point in the current installation instructions. The ArduPilot build environment should be built inside the ROS 2 workspace. If we tell the user to set it up here it might be confusing. So I moved this instruction further down.
|
||
.. code-block:: bash | ||
|
||
cd ~/ardu_ws | ||
sudo apt update | ||
rosdep update | ||
source /opt/ros/humble/setup.bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be unnecessary, the instructions assume that the ROS environment is setup and this is explicitly stated at the start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not required for people to add this to your ~/.bashrc. I have tried to make the commands as foolproof as possible, and becuase of that, our support load has decreased a lot.
@Ryanf55 @srmainwaring let me know what you think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! A good mix of unrelated improvements and direct instructions for Jazzy. It would be really cool if there was a way in rst
to have a dropdown at the top to select your ROS version and Gazebo version, then the rest of the content just updates automatically. Can you take a look to see if there's anything better for this than the tab method?
.. code-block:: bash | ||
.. tabs:: | ||
|
||
.. tab:: Jazzy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. tab:: Jazzy | |
.. tab:: ROS 2 Jazzy |
cd ~/ardu_ws | ||
vcs import --input https://raw.githubusercontent.com/ArduPilot/ardupilot_gz/main/jazzy_gz.repos --recursive src | ||
|
||
.. tab:: Humble |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. tab:: Humble | |
.. tab:: ROS 2 Humble |
.. tab:: Jazzy | ||
|
||
.. code-block:: bash | ||
|
||
cd ~/ardu_ws | ||
vcs import --input https://raw.githubusercontent.com/ArduPilot/ardupilot_gz/main/jazzy_gz.repos --recursive src | ||
|
||
.. tab:: Humble | ||
|
||
.. code-block:: bash | ||
|
||
cd ~/ardu_ws | ||
vcs import --input https://raw.githubusercontent.com/ArduPilot/ardupilot_gz/main/humble_gz.repos --recursive src |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with either approach. In a few other repos in Github, I started using mergify.io, so the work to maintain multiple branches is very low.
@@ -40,7 +52,7 @@ Update ROS dependencies: | |||
.. code-block:: bash | |||
|
|||
cd ~/ardu_ws | |||
source /opt/ros/humble/setup.bash | |||
source /opt/ros/$ROS_DISTRO/setup.bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert. ROS_DISTRO is not set until AFTER you run this.
Consider doing it like source /opt/ros/<your_ros_distro>/setup.bash
.. group-tab:: ArduPilot 4.6 and later | ||
|
||
.. code-block:: bash | ||
|
||
source /opt/ros/humble/setup.bash | ||
source /opt/ros/$ROS_DISTRO/setup.bash | ||
cd ~/ardu_ws/ | ||
colcon build --packages-up-to ardupilot_sitl | ||
source install/setup.bash | ||
ros2 launch ardupilot_sitl sitl_dds_udp.launch.py transport:=udp4 refs:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/dds_xrce_profile.xml synthetic_clock:=True wipe:=False model:=quad speedup:=1 slave:=0 instance:=0 defaults:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/copter.parm,$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/dds_udp.parm sim_address:=127.0.0.1 master:=tcp:127.0.0.1:5760 sitl:=127.0.0.1:5501 | ||
|
||
ros2 launch ardupilot_sitl sitl_dds_udp.launch.py transport:=udp4 synthetic_clock:=True wipe:=False model:=quad speedup:=1 slave:=0 instance:=0 defaults:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/copter.parm,$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/dds_udp.parm sim_address:=127.0.0.1 master:=tcp:127.0.0.1:5760 sitl:=127.0.0.1:5501 | ||
|
||
.. group-tab:: ArduPilot 4.6 and later | ||
.. group-tab:: ArduPilot 4.5 | ||
|
||
.. code-block:: bash | ||
|
||
source /opt/ros/humble/setup.bash | ||
source /opt/ros/$ROS_DISTRO/setup.bash | ||
cd ~/ardu_ws/ | ||
colcon build --packages-up-to ardupilot_sitl | ||
source install/setup.bash | ||
ros2 launch ardupilot_sitl sitl_dds_udp.launch.py transport:=udp4 synthetic_clock:=True wipe:=False model:=quad speedup:=1 slave:=0 instance:=0 defaults:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/copter.parm,$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/dds_udp.parm sim_address:=127.0.0.1 master:=tcp:127.0.0.1:5760 sitl:=127.0.0.1:5501 | ||
ros2 launch ardupilot_sitl sitl_dds_udp.launch.py transport:=udp4 refs:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/dds_xrce_profile.xml synthetic_clock:=True wipe:=False model:=quad speedup:=1 slave:=0 instance:=0 defaults:=$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/copter.parm,$(ros2 pkg prefix ardupilot_sitl)/share/ardupilot_sitl/config/default_params/dds_udp.parm sim_address:=127.0.0.1 master:=tcp:127.0.0.1:5760 sitl:=127.0.0.1:5501 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree on that change! Now that 4.6 is in beta.
@@ -17,49 +17,59 @@ Prerequisites | |||
|
|||
- Learn to use ArduPilot first by following the relevant wiki for `Rover <https://ardupilot.org/rover/index.html>`__, `Copter <https://ardupilot.org/copter/index.html>`__ or `Plane <https://ardupilot.org/plane/index.html>`__. | |||
- In particular, make sure the vehicle works well in Manual and Autonomous modes like Guided and Auto before trying to use ROS. | |||
- Learn how to use ROS 2 by reading the `beginner tutorials <https://docs.ros.org/en/humble/Tutorials.html>`__. In the case of a problem with ROS, it is best to ask on ROS community forums first (or google your error). | |||
- Learn how to use ROS 2 by reading the `beginner tutorials <https://docs.ros.org/en/rolling/Tutorials.html>`__. In the case of a problem with ROS, it is best to ask on ROS community forums first (or google your error). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, can you add a note to select the right version in the dropdown?
|
||
.. code-block:: bash | ||
|
||
cd ~/ardu_ws | ||
sudo apt update | ||
rosdep update | ||
source /opt/ros/humble/setup.bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not required for people to add this to your ~/.bashrc. I have tried to make the commands as foolproof as possible, and becuase of that, our support load has decreased a lot.
sudo apt install default-jre | ||
# Gradle 7.6 is not supported by java versions >= 20 | ||
# https://docs.gradle.org/current/userguide/compatibility.html | ||
sudo apt install openjdk-17-jre |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this available on Ubuntu 22?
Purpose
The migraton from
ROS humble
toROS Jazzy
is pretty trivial in our current setup. Simply checking out to the respectiveJazzy
branches is enough in linux.We should support it and provide installation guides to encourage more ROS 2 users to contribute.
PR dependency