-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Ubuntu 24.04 support for Rolling and Jazzy distros #3114
Ubuntu 24.04 support for Rolling and Jazzy distros #3114
Conversation
3551485
to
1301e91
Compare
|
|
e9c5e3e
to
52fae7d
Compare
@@ -173,7 +173,7 @@ namespace realsense2_camera | |||
class CimuData | |||
{ | |||
public: | |||
CimuData() : m_time_ns(-1) {}; | |||
CimuData() : m_data({0,0,0}), m_time_ns(-1) {}; |
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.
if we don't initialize m_data
, warnings are raised in Jazzy.
@@ -126,7 +128,8 @@ jobs: | |||
# the next command might be needed for foxy distro, since this package is not installed | |||
# by default in ubuntu 20.04. For other distro, the apt install command will be ignored. | |||
sudo apt install -y ros-${{matrix.ros_distro}}-sensor-msgs-py | |||
python3 src/realsense-ros/realsense2_camera/scripts/rs2_test.py non_existent_file | |||
source ../.venv/bin/activate |
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.
Why do we need this source command?
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 think to activate the virtual env (venv) created in line 116.
when creating venv, we should activate it to "run" inside it.
every command after it will be treated as inside the virtual env.
@Arun-Prasad-V am I right ?
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.
yes, to use python in virtual env.
rosdep update --rosdistro ${{ matrix.ros_distro }} --include-eol-distros | ||
echo "================= ROSDEP INSTALL ====================" | ||
rosdep install -i --reinstall --from-path src --rosdistro ${{ matrix.ros_distro }} --skip-keys=librealsense2 -y | ||
echo "================== COLCON BUILD ======================" | ||
colcon build --cmake-args '-DBUILD_TOOLS=ON' | ||
colcon build --cmake-args '-DBUILD_TOOLS=ON' --no-warn-unused-cli |
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 catch :)
Just an explanation to the record:
BUILD_TOOLS is relevant only for realsense2_camera package, so warnings on unused cmd line variable were printed for realsense2_camera_msgs and realsense2_description.
now with --no-warn-unused-cli
, there will be no warnings.
ref: https://cmake.org/cmake/help/v3.0/manual/cmake.1.html
--no-warn-unused-cli
Don’t warn about command line options.
Don’t find variables that are declared on the command line, but not used.
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!
I suggest adding a short sentence as a comment above this line.
Same for python venv usage
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.
LGTM
.github/workflows/main.yml
Outdated
@@ -126,7 +128,8 @@ jobs: | |||
# the next command might be needed for foxy distro, since this package is not installed | |||
# by default in ubuntu 20.04. For other distro, the apt install command will be ignored. | |||
sudo apt install -y ros-${{matrix.ros_distro}}-sensor-msgs-py | |||
python3 src/realsense-ros/realsense2_camera/scripts/rs2_test.py non_existent_file | |||
source ../.venv/bin/activate | |||
../.venv/bin/python3 src/realsense-ros/realsense2_camera/scripts/rs2_test.py non_existent_file |
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 think we can use python3
instead of ../.venv/bin/python3
, because the venv is already activated in previous line and no need to point the venv location here.
@Arun-Prasad-V please add a Jira number (Tracked on xxx) |
@@ -114,9 +112,13 @@ jobs: | |||
|
|||
- name: Install Packages For Tests | |||
run: | | |||
sudo apt install python3-venv | |||
python3 -m venv .venv |
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 meant here 😀
bd5705d
into
IntelRealSense:ros2-development
Tracked on LRS-1104