Migrate to ROS2 Lyrical for all non-lidar packages
- Switch base image / repos file / rosdep distro from jazzy to lyrical (ros:lyrical is built on Ubuntu resolute/26.04). - Vendor transport_drivers (serial_driver/io_context/udp_driver) since lyrical apt packages for them are not yet published; patch removes the now-gone ament_target_dependencies() macro. - Fix ament_target_dependencies() removal across agv_pro_base, agv_pro_hardware, agv_pro_rviz_plugins, and slam_gmapping by switching to target_link_libraries() with namespaced imported targets (or raw *_LIBRARIES/*_INCLUDE_DIRS variables for packages with no modern target: serial_driver, ASIO). - Migrate agv_pro_rviz_plugins from Qt5 to Qt6. - Fix Boost 1.90 dropping libboost-system-dev: use header-only Boost::boost instead of a system component. - Rename boost::asio::io_service -> io_context and mutable_buffers_1 -> mutable_buffer (Asio API removal) in agv_pro_hardware and agv_pro_base. - Update tf2/message_filters includes from removed .h shims to .hpp, and fix message_filters::Subscriber's QoS constructor signature. - Regenerate rosdep-packages.txt for lyrical; skip cartographer_ros/ orbbec_camera in rosdep install (exec_depend-only, not yet published as ros-lyrical-* apt packages -- tracked in TODO.md). - Lidar packages (fast_lio, livox_*, lslidar_*, point_lio, unitree_lidar_*) are deferred; their patches are present but not verified yet under lyrical. Verified: full docker build succeeds with colcon build reporting all 23 non-lidar/transport packages finished, 0 failed.
This commit is contained in:
1 parent
bbcb753c94
commit
46f7cbb8b5
27 files changed
+362
-137
No files matched your search
+1
-1
@@ -8,7 +8,7 @@ log/
|
||||
__pycache__/
|
||||
firmware_dumps/
|
||||
# src/upstream is fetched fresh by `vcs import` during the Docker build (see
|
||||
# upstream.jazzy.repos). Without this, COPY src ./src/ would ship whatever
|
||||
# upstream.lyrical.repos). Without this, COPY src ./src/ would ship whatever
|
||||
# upstream checkout happens to already exist in the local dev container
|
||||
# (possibly already patched, possibly stale) *before* vcs import runs, and
|
||||
# vcs import updates existing repos in place rather than cloning fresh --
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ install/
|
||||
log/
|
||||
/CMakeLists.txt
|
||||
__pycache__/
|
||||
# Ignore upstream as it is installedls by the upstream.jazzy.repos
|
||||
# Ignore upstream as it is installedls by the upstream.lyrical.repos
|
||||
src/upstream
|
||||
firmware_dumps/
|
||||
+11
-8
@@ -1,4 +1,4 @@
|
||||
FROM ros:jazzy
|
||||
FROM ros:lyrical
|
||||
|
||||
# Create the workspace and copy all source directories into it
|
||||
WORKDIR /ros2_ws
|
||||
@@ -6,16 +6,16 @@ ARG TARGETARCH
|
||||
|
||||
COPY src ./src/
|
||||
COPY patches ./patches/
|
||||
COPY upstream.jazzy.repos ./upstream.jazzy.repos
|
||||
COPY upstream.lyrical.repos ./upstream.lyrical.repos
|
||||
|
||||
# Import all upstream repostories
|
||||
RUN mkdir -p src/upstream && vcs import ./src/upstream < ./upstream.jazzy.repos
|
||||
RUN mkdir -p src/upstream && vcs import ./src/upstream < ./upstream.lyrical.repos
|
||||
|
||||
# Apply patches to upstream
|
||||
RUN ./patches/apply_patches.sh
|
||||
|
||||
# Make sure the base image is completely up to date
|
||||
# ros:jazzy ships /etc/apt/apt.conf.d/docker-clean which purges downloaded .debs;
|
||||
# ros:lyrical ships /etc/apt/apt.conf.d/docker-clean which purges downloaded .debs;
|
||||
# remove it so the --mount=type=cache on /var/cache/apt actually retains archives.
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGETARCH} \
|
||||
rm -f /etc/apt/apt.conf.d/docker-clean \
|
||||
@@ -48,19 +48,22 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-cache-${TARGE
|
||||
|
||||
# Install dependencies with rosdep
|
||||
# This will catch anything that wasn't installed via .deb's from the frozen rosdep manifest.
|
||||
# cartographer_ros/orbbec_camera are skipped: both are exec_depend-only (not needed to
|
||||
# build) and aren't published as ros-lyrical-* apt packages yet -- see TODO.md.
|
||||
RUN apt-get update && \
|
||||
rosdep update && \
|
||||
rosdep install --from-paths src --ignore-src -r -y && \
|
||||
rosdep install --from-paths src --ignore-src -r -y \
|
||||
--skip-keys "cartographer_ros orbbec_camera" && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Build the workspace with symlink install
|
||||
# livox_sdk is now an ament_cmake package built by colcon (no manual /usr/local install needed).
|
||||
RUN . /opt/ros/jazzy/setup.sh && \
|
||||
RUN . /opt/ros/lyrical/setup.sh && \
|
||||
colcon build --symlink-install \
|
||||
--cmake-args -DROS_EDITION=ROS2 -DDISTRO_ROS=jazzy
|
||||
--cmake-args -DROS_EDITION=ROS2 -DDISTRO_ROS=lyrical
|
||||
|
||||
# Source the overlay on container startup
|
||||
RUN echo "source /opt/ros/jazzy/setup.bash" >> /root/.bashrc && \
|
||||
RUN echo "source /opt/ros/lyrical/setup.bash" >> /root/.bashrc && \
|
||||
echo "source /ros2_ws/install/setup.bash" >> /root/.bashrc
|
||||
|
||||
CMD ["bash"]
|
||||
@@ -8,8 +8,8 @@ ROS2 packages for AGV_Pro
|
||||
> Software environment for Jetson Orin Nano
|
||||
|
||||
```
|
||||
ubuntu 22.04
|
||||
ros2 humble
|
||||
ubuntu 24.04
|
||||
ros2 lyrical
|
||||
```
|
||||
|
||||
# Installation
|
||||
@@ -70,7 +70,7 @@ colcon build
|
||||
```
|
||||
- `agv_pro_can` — wheels are controlled directly over CAN using the RobStride private
|
||||
protocol instead of serial, via the community [`robstride_ros2`](https://github.com/s2015-turtle/robstride_ros2)
|
||||
`ros2_control` driver (built from source, see `upstream.jazzy.repos`). IMU/voltage/digital-IO/LED
|
||||
`ros2_control` driver (built from source, see `upstream.lyrical.repos`). IMU/voltage/digital-IO/LED
|
||||
remain on the serial base controller (`/dev/agvpro_controller`), unchanged. This replaces an
|
||||
earlier CANopen-based attempt (`agv_pro_canopen_config`/`ros2_canopen`) that was never
|
||||
confirmed against real hardware and has been removed — real, direction-confirmed CAN
|
||||
|
||||
@@ -1,5 +1,57 @@
|
||||
# TODO
|
||||
|
||||
## ROS 2 Lyrical migration (`lyrical` branch)
|
||||
|
||||
Everything except the lidar stack has been moved to build against `ros:lyrical`
|
||||
(Dockerfile, `upstream.lyrical.repos`, `rosdep-packages.txt`). The following upstream
|
||||
packages are temporarily excluded from the colcon build via a `COLCON_IGNORE` marker
|
||||
(captured in their respective `patches/*.patch` so it survives a fresh `vcs import`),
|
||||
pending a dedicated pass to get them building under Lyrical:
|
||||
|
||||
- `FAST_LIO` (`patches/fast_lio.patch`)
|
||||
- `livox_ros_driver2` (`patches/livox_ros_driver2.patch`)
|
||||
- `livox_sdk` (`patches/livox_sdk.patch`)
|
||||
- `Lslidar_ROS2_driver` (`patches/lslidar_ros2_driver.patch`, new)
|
||||
- `point_lio_ros2` (`patches/point_lio_ros2.patch`, new)
|
||||
- `unilidar_sdk2` (`patches/unilidar_sdk2.patch`)
|
||||
|
||||
`agv_pro_bringup`'s `exec_depend` on `livox_ros_driver2`/`lslidar_driver` is left as-is —
|
||||
rosdep's `--ignore-src` treats those as satisfied by the (ignored) local source packages,
|
||||
so this doesn't block `rosdep install`. The `wheel_interface`/lidar-dependent launch
|
||||
options simply won't have a built executable until the lidar packages are revisited.
|
||||
|
||||
- [ ] Re-enable the lidar packages above (remove their `COLCON_IGNORE`) and fix whatever
|
||||
breaks building them under `ros:lyrical`.
|
||||
|
||||
`agv_pro_base` hard-depends on `serial_driver`/`io_context` (from the
|
||||
`ros-drivers/transport_drivers` repo) at build time, but `ros-lyrical-serial-driver`/
|
||||
`ros-lyrical-io-context` aren't published as apt packages yet (confirmed via
|
||||
`apt-cache policy` in a real `ros:lyrical` container — index.ros.org lists them as
|
||||
"released" for lyrical, but the actual .debs haven't synced to the mirror). Worked
|
||||
around by vendoring `ros-drivers/transport_drivers` from source in
|
||||
`upstream.lyrical.repos` instead of relying on the apt packages. It also needed a
|
||||
CMake fix (`patches/transport_drivers.patch`): `ament_target_dependencies()` has been
|
||||
removed entirely from Lyrical's `ament_cmake`, so the `ASIO` linkage (a non-ROS
|
||||
dependency resolved via an old-style `Find<Pkg>.cmake` module, no modern imported
|
||||
target) had to be replaced with manual `target_include_directories`/
|
||||
`target_compile_definitions` using `${ASIO_INCLUDE_DIRS}`/`${ASIO_DEFINITIONS}`, and
|
||||
the package's own test targets switched to linking modern namespaced targets
|
||||
(`rclcpp::rclcpp`, `std_msgs::std_msgs__rosidl_typesupport_cpp`, etc.).
|
||||
|
||||
- [ ] Once `ros-lyrical-serial-driver`/`ros-lyrical-io-context` are actually published,
|
||||
consider dropping the vendored `transport_drivers` in favor of the apt packages
|
||||
again (re-run `./scripts/freeze-rosdep.sh` to confirm).
|
||||
|
||||
`ros-lyrical-cartographer-ros` (used by `agv_pro_bringup`) and `ros-lyrical-orbbec-camera`
|
||||
(used by `agv_pro_slam`) are likewise not yet published as apt packages for lyrical. Both
|
||||
are `exec_depend`-only (not needed to build), so they were simply removed from
|
||||
`rosdep-packages.txt` — same treatment as the lidar exec_depends. The corresponding
|
||||
launch options (cartographer-based mapping, Orbbec RGBD input) won't have a runnable
|
||||
package installed in the image until these are published upstream.
|
||||
|
||||
- [ ] Re-add `ros-lyrical-cartographer-ros`/`ros-lyrical-orbbec-camera` to
|
||||
`rosdep-packages.txt` once they're actually installable via apt.
|
||||
|
||||
Need to patch src/upstream/slam_gmapping/include/slam_gmapping/slam_gmapping.h
|
||||
|
||||
#include "tf2_geometry_msgs/tf2_geometry_msgs.h"
|
||||
@@ -33,7 +85,7 @@ package, after empirically confirming real CAN communication with the wheel driv
|
||||
- [ ] Confirm `can_timeout_ticks` (currently the package default, 4000 ticks = 200 ms) is an
|
||||
appropriate watchdog window for this platform.
|
||||
- [ ] Build-test: `colcon build` will build `robstride_ros2` and `ros2_socketcan` from
|
||||
source per `upstream.jazzy.repos` — not yet exercised in this workspace.
|
||||
source per `upstream.lyrical.repos` — not yet exercised in this workspace.
|
||||
- [ ] End-to-end test: confirm `ros2 launch agv_pro_bringup agv_pro_bringup.launch.py
|
||||
wheel_interface:=can` actually drives all four wheels through the full
|
||||
`ros2_control`/`mecanum_drive_controller` stack (only ad-hoc Python/CAN scripts have
|
||||
|
||||
@@ -27,5 +27,8 @@ apply_patch_once() {
|
||||
apply_patch_once "$ROOT_DIR/src/upstream/FAST_LIO" "$PATCH_DIR/fast_lio.patch"
|
||||
apply_patch_once "$ROOT_DIR/src/upstream/livox_sdk" "$PATCH_DIR/livox_sdk.patch"
|
||||
apply_patch_once "$ROOT_DIR/src/upstream/livox_ros_driver2" "$PATCH_DIR/livox_ros_driver2.patch"
|
||||
apply_patch_once "$ROOT_DIR/src/upstream/Lslidar_ROS2_driver" "$PATCH_DIR/lslidar_ros2_driver.patch"
|
||||
apply_patch_once "$ROOT_DIR/src/upstream/point_lio_ros2" "$PATCH_DIR/point_lio_ros2.patch"
|
||||
apply_patch_once "$ROOT_DIR/src/upstream/slam_gmapping" "$PATCH_DIR/slam_gmapping.patch"
|
||||
apply_patch_once "$ROOT_DIR/src/upstream/unilidar_sdk2" "$PATCH_DIR/unilidar_sdk2.patch"
|
||||
apply_patch_once "$ROOT_DIR/src/upstream/transport_drivers" "$PATCH_DIR/transport_drivers.patch"
|
||||
@@ -47,3 +47,6 @@ index be3040b..3176847 100644
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
message("Current CPU archtecture: ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
diff --git a/COLCON_IGNORE b/COLCON_IGNORE
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
@@ -87,3 +87,6 @@ index 96f5762..c66785b 100644
|
||||
|
||||
<export>
|
||||
<build_type>ament_cmake</build_type>
|
||||
diff --git a/COLCON_IGNORE b/COLCON_IGNORE
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
@@ -63,3 +63,6 @@ index 05f84c5..4fb6f31 100644
|
||||
+ament_export_include_directories(include)
|
||||
+ament_export_libraries(livox_lidar_sdk_shared)
|
||||
+ament_package()
|
||||
diff --git a/COLCON_IGNORE b/COLCON_IGNORE
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
@@ -0,0 +1,3 @@
|
||||
diff --git a/COLCON_IGNORE b/COLCON_IGNORE
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
@@ -0,0 +1,3 @@
|
||||
diff --git a/COLCON_IGNORE b/COLCON_IGNORE
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
@@ -1,8 +1,38 @@
|
||||
diff --git a/slam_gmapping/CMakeLists.txt b/slam_gmapping/CMakeLists.txt
|
||||
index d0115c0..40d9df2 100644
|
||||
--- a/slam_gmapping/CMakeLists.txt
|
||||
+++ b/slam_gmapping/CMakeLists.txt
|
||||
@@ -44,15 +44,16 @@ include_directories(include)
|
||||
|
||||
add_executable(slam_gmapping src/slam_gmapping.cpp)
|
||||
|
||||
-ament_target_dependencies(slam_gmapping
|
||||
- rclcpp
|
||||
- tf2
|
||||
- tf2_ros
|
||||
- message_filters
|
||||
- sensor_msgs
|
||||
- nav_msgs
|
||||
- tf2_geometry_msgs
|
||||
- openslam_gmapping)
|
||||
+target_include_directories(slam_gmapping PUBLIC ${openslam_gmapping_INCLUDE_DIRS})
|
||||
+target_link_libraries(slam_gmapping
|
||||
+ rclcpp::rclcpp
|
||||
+ tf2::tf2
|
||||
+ tf2_ros::tf2_ros
|
||||
+ message_filters::message_filters
|
||||
+ sensor_msgs::sensor_msgs
|
||||
+ nav_msgs::nav_msgs
|
||||
+ tf2_geometry_msgs::tf2_geometry_msgs
|
||||
+ ${openslam_gmapping_LIBRARIES})
|
||||
|
||||
install(TARGETS slam_gmapping
|
||||
DESTINATION lib/${PROJECT_NAME})
|
||||
diff --git a/slam_gmapping/include/slam_gmapping/slam_gmapping.h b/slam_gmapping/include/slam_gmapping/slam_gmapping.h
|
||||
index 1ee2e5c..204ca85 100644
|
||||
index 1ee2e5c..b43f738 100644
|
||||
--- a/slam_gmapping/include/slam_gmapping/slam_gmapping.h
|
||||
+++ b/slam_gmapping/include/slam_gmapping/slam_gmapping.h
|
||||
@@ -35,7 +35,7 @@
|
||||
@@ -35,11 +35,11 @@
|
||||
#include "geometry_msgs/msg/pose.hpp"
|
||||
#include "geometry_msgs/msg/pose_stamped.hpp"
|
||||
#include "geometry_msgs/msg/transform_stamped.hpp"
|
||||
@@ -10,4 +40,23 @@ index 1ee2e5c..204ca85 100644
|
||||
+#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
|
||||
#include "tf2_ros/transform_listener.h"
|
||||
#include "tf2_ros/transform_broadcaster.h"
|
||||
#include "tf2/utils.h"
|
||||
-#include "tf2/utils.h"
|
||||
-#include "message_filters/subscriber.h"
|
||||
+#include "tf2/utils.hpp"
|
||||
+#include "message_filters/subscriber.hpp"
|
||||
#include "tf2_ros/message_filter.h"
|
||||
|
||||
#include "gmapping/gridfastslam/gridslamprocessor.h"
|
||||
diff --git a/slam_gmapping/src/slam_gmapping.cpp b/slam_gmapping/src/slam_gmapping.cpp
|
||||
index 8500f8e..2b47c76 100644
|
||||
--- a/slam_gmapping/src/slam_gmapping.cpp
|
||||
+++ b/slam_gmapping/src/slam_gmapping.cpp
|
||||
@@ -102,7 +102,7 @@ void SlamGmapping::startLiveSlam() {
|
||||
sst_ = this->create_publisher<nav_msgs::msg::OccupancyGrid>("map", rclcpp::SystemDefaultsQoS());
|
||||
sstm_ = this->create_publisher<nav_msgs::msg::MapMetaData>("map_metadata", rclcpp::SystemDefaultsQoS());
|
||||
scan_filter_sub_ = std::make_shared<message_filters::Subscriber<sensor_msgs::msg::LaserScan>>
|
||||
- (node_, "scan", rclcpp::SensorDataQoS().get_rmw_qos_profile());
|
||||
+ (node_, "scan", rclcpp::SensorDataQoS());
|
||||
// sub_ = this->create_subscription<sensor_msgs::msg::LaserScan>(
|
||||
// "scan", rclcpp::SensorDataQoS(),
|
||||
// std::bind(&SlamGmapping::laserCallback, this, std::placeholders::_1));
|
||||
@@ -0,0 +1,120 @@
|
||||
diff --git a/io_context/CMakeLists.txt b/io_context/CMakeLists.txt
|
||||
index 3c04653..4f7226f 100644
|
||||
--- a/io_context/CMakeLists.txt
|
||||
+++ b/io_context/CMakeLists.txt
|
||||
@@ -38,7 +38,8 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
|
||||
src/io_context.cpp
|
||||
src/msg_converters/std_msgs.cpp
|
||||
)
|
||||
-ament_target_dependencies(${PROJECT_NAME} "ASIO")
|
||||
+target_include_directories(${PROJECT_NAME} PUBLIC ${ASIO_INCLUDE_DIRS})
|
||||
+target_compile_definitions(${PROJECT_NAME} PUBLIC ${ASIO_DEFINITIONS})
|
||||
|
||||
if(BUILD_TESTING)
|
||||
find_package(ament_lint_auto REQUIRED)
|
||||
@@ -48,7 +49,9 @@ if(BUILD_TESTING)
|
||||
|
||||
ament_add_gtest(${TEST_UDP_DRIVER_EXE}
|
||||
test/${name}.cpp)
|
||||
- ament_target_dependencies(${TEST_UDP_DRIVER_EXE} std_msgs udp_msgs "ASIO")
|
||||
+ target_link_libraries(${TEST_UDP_DRIVER_EXE} std_msgs::std_msgs__rosidl_typesupport_cpp udp_msgs::udp_msgs__rosidl_typesupport_cpp)
|
||||
+ target_include_directories(${TEST_UDP_DRIVER_EXE} PRIVATE ${ASIO_INCLUDE_DIRS})
|
||||
+ target_compile_definitions(${TEST_UDP_DRIVER_EXE} PRIVATE ${ASIO_DEFINITIONS})
|
||||
|
||||
target_include_directories(${TEST_UDP_DRIVER_EXE} PRIVATE include)
|
||||
target_link_libraries(${TEST_UDP_DRIVER_EXE} ${PROJECT_NAME})
|
||||
diff --git a/serial_driver/CMakeLists.txt b/serial_driver/CMakeLists.txt
|
||||
index 9055ace..2d4d1bd 100644
|
||||
--- a/serial_driver/CMakeLists.txt
|
||||
+++ b/serial_driver/CMakeLists.txt
|
||||
@@ -38,7 +38,8 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
|
||||
src/serial_driver.cpp
|
||||
)
|
||||
|
||||
-ament_target_dependencies(${PROJECT_NAME} "ASIO")
|
||||
+target_include_directories(${PROJECT_NAME} PUBLIC ${ASIO_INCLUDE_DIRS})
|
||||
+target_compile_definitions(${PROJECT_NAME} PUBLIC ${ASIO_DEFINITIONS})
|
||||
|
||||
ament_auto_add_library(${PROJECT_NAME}_nodes SHARED
|
||||
src/serial_bridge_node.cpp
|
||||
@@ -50,7 +51,8 @@ rclcpp_components_register_node(${PROJECT_NAME}_nodes
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}_nodes ${PROJECT_NAME})
|
||||
-ament_target_dependencies(${PROJECT_NAME}_nodes "ASIO")
|
||||
+target_include_directories(${PROJECT_NAME}_nodes PUBLIC ${ASIO_INCLUDE_DIRS})
|
||||
+target_compile_definitions(${PROJECT_NAME}_nodes PUBLIC ${ASIO_DEFINITIONS})
|
||||
|
||||
if(BUILD_TESTING)
|
||||
find_package(ament_lint_auto)
|
||||
@@ -68,12 +70,9 @@ if(BUILD_TESTING)
|
||||
ament_add_gtest(${TEST_SERIAL_DRIVER_EXE}
|
||||
test/${name}.cpp
|
||||
)
|
||||
- ament_target_dependencies(${TEST_SERIAL_DRIVER_EXE}
|
||||
- rclcpp
|
||||
- lifecycle_msgs
|
||||
- ASIO
|
||||
- )
|
||||
- target_include_directories(${TEST_SERIAL_DRIVER_EXE} PRIVATE include)
|
||||
+ target_link_libraries(${TEST_SERIAL_DRIVER_EXE} rclcpp::rclcpp lifecycle_msgs::lifecycle_msgs__rosidl_typesupport_cpp)
|
||||
+ target_include_directories(${TEST_SERIAL_DRIVER_EXE} PRIVATE include ${ASIO_INCLUDE_DIRS})
|
||||
+ target_compile_definitions(${TEST_SERIAL_DRIVER_EXE} PRIVATE ${ASIO_DEFINITIONS})
|
||||
target_link_libraries(${TEST_SERIAL_DRIVER_EXE} ${PROJECT_NAME} ${PROJECT_NAME_NODES})
|
||||
endforeach()
|
||||
endif()
|
||||
diff --git a/udp_driver/CMakeLists.txt b/udp_driver/CMakeLists.txt
|
||||
index f78d262..cf8abd8 100644
|
||||
--- a/udp_driver/CMakeLists.txt
|
||||
+++ b/udp_driver/CMakeLists.txt
|
||||
@@ -38,13 +38,15 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
|
||||
src/udp_socket.cpp
|
||||
src/udp_driver.cpp
|
||||
)
|
||||
-ament_target_dependencies(${PROJECT_NAME} "ASIO")
|
||||
+target_include_directories(${PROJECT_NAME} PUBLIC ${ASIO_INCLUDE_DIRS})
|
||||
+target_compile_definitions(${PROJECT_NAME} PUBLIC ${ASIO_DEFINITIONS})
|
||||
|
||||
ament_auto_add_library(${PROJECT_NAME}_nodes SHARED
|
||||
src/udp_receiver_node.cpp
|
||||
src/udp_sender_node.cpp
|
||||
)
|
||||
-ament_target_dependencies(${PROJECT_NAME}_nodes "ASIO")
|
||||
+target_include_directories(${PROJECT_NAME}_nodes PUBLIC ${ASIO_INCLUDE_DIRS})
|
||||
+target_compile_definitions(${PROJECT_NAME}_nodes PUBLIC ${ASIO_DEFINITIONS})
|
||||
target_link_libraries(${PROJECT_NAME}_nodes ${PROJECT_NAME})
|
||||
|
||||
rclcpp_components_register_node(${PROJECT_NAME}_nodes
|
||||
@@ -62,7 +64,8 @@ ament_auto_add_executable(udp_bridge_node_exe
|
||||
)
|
||||
|
||||
target_link_libraries(udp_bridge_node_exe ${PROJECT_NAME} ${PROJECT_NAME}_nodes)
|
||||
-ament_target_dependencies(udp_bridge_node_exe ASIO)
|
||||
+target_include_directories(udp_bridge_node_exe PUBLIC ${ASIO_INCLUDE_DIRS})
|
||||
+target_compile_definitions(udp_bridge_node_exe PUBLIC ${ASIO_DEFINITIONS})
|
||||
|
||||
if(BUILD_TESTING)
|
||||
find_package(ament_lint_auto REQUIRED)
|
||||
@@ -80,14 +83,14 @@ if(BUILD_TESTING)
|
||||
|
||||
ament_add_gtest(${TEST_UDP_DRIVER_EXE}
|
||||
test/${name}.cpp)
|
||||
- ament_target_dependencies(${TEST_UDP_DRIVER_EXE}
|
||||
- rclcpp
|
||||
- std_msgs
|
||||
- udp_msgs
|
||||
- lifecycle_msgs
|
||||
- ASIO)
|
||||
-
|
||||
- target_include_directories(${TEST_UDP_DRIVER_EXE} PRIVATE include)
|
||||
+ target_link_libraries(${TEST_UDP_DRIVER_EXE}
|
||||
+ rclcpp::rclcpp
|
||||
+ std_msgs::std_msgs__rosidl_typesupport_cpp
|
||||
+ udp_msgs::udp_msgs__rosidl_typesupport_cpp
|
||||
+ lifecycle_msgs::lifecycle_msgs__rosidl_typesupport_cpp)
|
||||
+
|
||||
+ target_include_directories(${TEST_UDP_DRIVER_EXE} PRIVATE include ${ASIO_INCLUDE_DIRS})
|
||||
+ target_compile_definitions(${TEST_UDP_DRIVER_EXE} PRIVATE ${ASIO_DEFINITIONS})
|
||||
target_link_libraries(${TEST_UDP_DRIVER_EXE} ${PROJECT_NAME} ${PROJECT_NAME}_nodes)
|
||||
endforeach()
|
||||
endif()
|
||||
@@ -131,3 +131,6 @@ index 0000000..ef88d9a
|
||||
+ <build_type>ament_cmake</build_type>
|
||||
+ </export>
|
||||
+</package>
|
||||
diff --git a/COLCON_IGNORE b/COLCON_IGNORE
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
||||
+41
-72
@@ -1,73 +1,42 @@
|
||||
git
|
||||
libapr1-dev libaprutil1-dev
|
||||
libboost-all-dev
|
||||
libpcap0.8-dev
|
||||
libpcl-apps1.14 libpcl-common1.14 libpcl-features1.14 libpcl-filters1.14 libpcl-io1.14 libpcl-kdtree1.14 libpcl-keypoints1.14 libpcl-ml1.14 libpcl-octree1.14 libpcl-outofcore1.14 libpcl-people1.14 libpcl-recognition1.14 libpcl-registration1.14 libpcl-sample-consensus1.14 libpcl-search1.14 libpcl-segmentation1.14 libpcl-stereo1.14 libpcl-surface1.14 libpcl-tracking1.14 libpcl-visualization1.14
|
||||
libpcl-dev
|
||||
libqt5core5t64
|
||||
libqt5gui5t64
|
||||
libqt5opengl5t64
|
||||
libqt5widgets5t64
|
||||
libasio-dev
|
||||
libboost-dev
|
||||
libqt6core6t64
|
||||
libqt6gui6
|
||||
libqt6opengl6
|
||||
libqt6widgets6
|
||||
python3-pytest
|
||||
qtbase5-dev
|
||||
ros-jazzy-ament-cmake
|
||||
ros-jazzy-ament-cmake-auto
|
||||
ros-jazzy-ament-cmake-black
|
||||
ros-jazzy-ament-cmake-clang-format
|
||||
ros-jazzy-ament-cmake-clang-tidy
|
||||
ros-jazzy-ament-cmake-copyright
|
||||
ros-jazzy-ament-cmake-xmllint
|
||||
ros-jazzy-ament-copyright
|
||||
ros-jazzy-ament-flake8
|
||||
ros-jazzy-ament-index-cpp
|
||||
ros-jazzy-ament-lint-auto
|
||||
ros-jazzy-ament-lint-common
|
||||
ros-jazzy-ament-pep257
|
||||
ros-jazzy-asio-cmake-module
|
||||
ros-jazzy-builtin-interfaces
|
||||
ros-jazzy-cartographer-ros
|
||||
ros-jazzy-common-interfaces
|
||||
ros-jazzy-controller-manager
|
||||
ros-jazzy-diff-drive-controller
|
||||
ros-jazzy-geometry-msgs
|
||||
ros-jazzy-io-context
|
||||
ros-jazzy-joint-state-broadcaster
|
||||
ros-jazzy-joint-state-publisher
|
||||
ros-jazzy-message-filters
|
||||
ros-jazzy-nav-msgs
|
||||
ros-jazzy-nav2-bringup
|
||||
ros-jazzy-nav2-simple-commander
|
||||
ros-jazzy-orbbec-camera
|
||||
ros-jazzy-pcl-conversions
|
||||
ros-jazzy-pcl-ros
|
||||
ros-jazzy-pluginlib
|
||||
ros-jazzy-rcl-interfaces
|
||||
ros-jazzy-rclcpp
|
||||
ros-jazzy-rclcpp-components
|
||||
ros-jazzy-rclpy
|
||||
ros-jazzy-rcutils
|
||||
ros-jazzy-resource-retriever
|
||||
ros-jazzy-robot-state-publisher
|
||||
ros-jazzy-ros2-control
|
||||
ros-jazzy-rosbag2
|
||||
ros-jazzy-rosidl-default-generators
|
||||
ros-jazzy-rosidl-default-runtime
|
||||
ros-jazzy-rtabmap-demos
|
||||
ros-jazzy-rtabmap-slam
|
||||
ros-jazzy-rtabmap-sync
|
||||
ros-jazzy-rtabmap-util
|
||||
ros-jazzy-rtabmap-viz
|
||||
ros-jazzy-rviz-common
|
||||
ros-jazzy-rviz-default-plugins
|
||||
ros-jazzy-rviz-ogre-vendor
|
||||
ros-jazzy-rviz-rendering
|
||||
ros-jazzy-rviz2
|
||||
ros-jazzy-sensor-msgs
|
||||
ros-jazzy-serial-driver
|
||||
ros-jazzy-std-msgs
|
||||
ros-jazzy-teleop-twist-keyboard
|
||||
ros-jazzy-tf2
|
||||
ros-jazzy-tf2-geometry-msgs
|
||||
ros-jazzy-tf2-ros
|
||||
ros-jazzy-visualization-msgs
|
||||
ros-jazzy-xacro
|
||||
qt6-base-dev
|
||||
ros-lyrical-ament-cmake-black
|
||||
ros-lyrical-ament-cmake-clang-format
|
||||
ros-lyrical-ament-cmake-clang-tidy
|
||||
ros-lyrical-can-msgs
|
||||
ros-lyrical-controller-manager
|
||||
ros-lyrical-forward-command-controller
|
||||
ros-lyrical-gz-ros2-control
|
||||
ros-lyrical-hardware-interface
|
||||
ros-lyrical-joint-state-broadcaster
|
||||
ros-lyrical-joint-state-publisher
|
||||
ros-lyrical-laser-filters
|
||||
ros-lyrical-mecanum-drive-controller
|
||||
ros-lyrical-nav2-bringup
|
||||
ros-lyrical-nav2-simple-commander
|
||||
ros-lyrical-pcl-conversions
|
||||
ros-lyrical-pcl-ros
|
||||
ros-lyrical-resource-retriever
|
||||
ros-lyrical-ros-gz-bridge
|
||||
ros-lyrical-ros-gz-sim
|
||||
ros-lyrical-ros2-control
|
||||
ros-lyrical-rtabmap-demos
|
||||
ros-lyrical-rtabmap-slam
|
||||
ros-lyrical-rtabmap-sync
|
||||
ros-lyrical-rtabmap-util
|
||||
ros-lyrical-rtabmap-viz
|
||||
ros-lyrical-rviz-common
|
||||
ros-lyrical-rviz-default-plugins
|
||||
ros-lyrical-rviz-ogre-vendor
|
||||
ros-lyrical-rviz-rendering
|
||||
ros-lyrical-rviz2
|
||||
ros-lyrical-slam-toolbox
|
||||
ros-lyrical-teleop-twist-keyboard
|
||||
ros-lyrical-udp-msgs
|
||||
ros-lyrical-xacro
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
ROS_DISTRO="${ROS_DISTRO:-jazzy}"
|
||||
ROS_DISTRO="${ROS_DISTRO:-lyrical}"
|
||||
rosdep update --rosdistro "$ROS_DISTRO" >/dev/null 2>&1 || true
|
||||
rosdep keys --from-paths src --ignore-src --rosdistro "$ROS_DISTRO" 2>/dev/null \
|
||||
| xargs rosdep resolve --rosdistro "$ROS_DISTRO" 2>/dev/null \
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
# setup_upstream.sh — fetch the upstream sources agv_pro_ros2 depends on
|
||||
# and apply any required patches.
|
||||
#
|
||||
# Sources are declared in upstream.jazzy.repos and cloned under src/upstream/.
|
||||
# Sources are declared in upstream.lyrical.repos and cloned under src/upstream/.
|
||||
# Patches in patches/ are applied idempotently (already-applied patches are
|
||||
# silently skipped).
|
||||
#
|
||||
@@ -28,7 +28,7 @@ for repo_dir in src/upstream/*/; do
|
||||
fi
|
||||
done
|
||||
|
||||
vcs import src/upstream < upstream.jazzy.repos
|
||||
vcs import src/upstream < upstream.lyrical.repos
|
||||
|
||||
echo "[setup_upstream] applying patches ..."
|
||||
bash patches/apply_patches.sh
|
||||
|
||||
@@ -29,21 +29,24 @@ add_executable(agv_pro_node
|
||||
|
||||
target_include_directories(agv_pro_node PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
$<INSTALL_INTERFACE:include>
|
||||
${serial_driver_INCLUDE_DIRS})
|
||||
|
||||
target_compile_features(agv_pro_node PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
|
||||
|
||||
ament_target_dependencies(agv_pro_node
|
||||
rclcpp
|
||||
tf2
|
||||
tf2_ros
|
||||
tf2_geometry_msgs
|
||||
std_msgs
|
||||
sensor_msgs
|
||||
geometry_msgs
|
||||
serial_driver
|
||||
nav_msgs
|
||||
agv_pro_msgs
|
||||
# serial_driver only exports legacy ament_export_libraries variables, no
|
||||
# namespaced CMake target, so it must be linked via ${serial_driver_LIBRARIES}.
|
||||
target_link_libraries(agv_pro_node
|
||||
rclcpp::rclcpp
|
||||
tf2::tf2
|
||||
tf2_ros::tf2_ros
|
||||
tf2_geometry_msgs::tf2_geometry_msgs
|
||||
std_msgs::std_msgs
|
||||
sensor_msgs::sensor_msgs
|
||||
geometry_msgs::geometry_msgs
|
||||
${serial_driver_LIBRARIES}
|
||||
nav_msgs::nav_msgs
|
||||
agv_pro_msgs::agv_pro_msgs
|
||||
)
|
||||
|
||||
install(TARGETS agv_pro_node
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <std_msgs/msg/float32.hpp>
|
||||
#include <sensor_msgs/msg/imu.hpp>
|
||||
#include <tf2_ros/transform_broadcaster.h>
|
||||
#include <tf2/LinearMath/Quaternion.h>
|
||||
#include <tf2/LinearMath/Quaternion.hpp>
|
||||
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
|
||||
#include <agv_pro_msgs/srv/set_digital_output.hpp>
|
||||
#include <agv_pro_msgs/srv/get_digital_input.hpp>
|
||||
@@ -208,7 +208,7 @@ private:
|
||||
const std::shared_ptr<agv_pro_msgs::srv::SetLedMode::Request> request,
|
||||
std::shared_ptr<agv_pro_msgs::srv::SetLedMode::Response> response);
|
||||
|
||||
boost::asio::io_service io_;
|
||||
boost::asio::io_context io_;
|
||||
std::unique_ptr<boost::asio::serial_port> serial_port_;
|
||||
|
||||
std::string frame_id_of_odometry_;
|
||||
|
||||
@@ -67,7 +67,7 @@ std::vector<uint8_t> AGV_PRO::read_serial_response(
|
||||
rclcpp::Duration timeout = rclcpp::Duration::from_seconds(timeout_sec);
|
||||
|
||||
while ((this->now() - start_time) < timeout) {
|
||||
boost::asio::mutable_buffers_1 buf(&byte, 1);
|
||||
boost::asio::mutable_buffer buf(&byte, 1);
|
||||
boost::system::error_code ec;
|
||||
size_t n = serial_port_->read_some(buf, ec);
|
||||
if (ec) {
|
||||
@@ -95,7 +95,7 @@ std::vector<uint8_t> AGV_PRO::read_serial_response(
|
||||
size_t total_read = 0;
|
||||
|
||||
while (total_read < remain_len && (this->now() - start_time) < timeout) {
|
||||
boost::asio::mutable_buffers_1 buf(&remain_buf[total_read], remain_len - total_read);
|
||||
boost::asio::mutable_buffer buf(&remain_buf[total_read], remain_len - total_read);
|
||||
boost::system::error_code ec;
|
||||
size_t n = serial_port_->read_some(buf, ec);
|
||||
if (ec) {
|
||||
|
||||
@@ -13,7 +13,7 @@ find_package(sensor_msgs REQUIRED)
|
||||
find_package(std_msgs REQUIRED)
|
||||
find_package(agv_pro_msgs REQUIRED)
|
||||
find_package(tf2 REQUIRED)
|
||||
find_package(Boost REQUIRED COMPONENTS system)
|
||||
find_package(Boost REQUIRED)
|
||||
|
||||
add_library(agv_pro_hardware SHARED
|
||||
src/agv_pro_hardware_interface.cpp
|
||||
@@ -26,17 +26,17 @@ target_include_directories(agv_pro_hardware PUBLIC
|
||||
|
||||
target_compile_features(agv_pro_hardware PUBLIC c_std_99 cxx_std_17)
|
||||
|
||||
ament_target_dependencies(agv_pro_hardware
|
||||
rclcpp
|
||||
hardware_interface
|
||||
pluginlib
|
||||
sensor_msgs
|
||||
std_msgs
|
||||
agv_pro_msgs
|
||||
tf2
|
||||
target_link_libraries(agv_pro_hardware
|
||||
rclcpp::rclcpp
|
||||
hardware_interface::hardware_interface
|
||||
pluginlib::pluginlib
|
||||
sensor_msgs::sensor_msgs
|
||||
std_msgs::std_msgs
|
||||
agv_pro_msgs::agv_pro_msgs
|
||||
tf2::tf2
|
||||
)
|
||||
|
||||
target_link_libraries(agv_pro_hardware Boost::system)
|
||||
target_link_libraries(agv_pro_hardware Boost::boost)
|
||||
|
||||
pluginlib_export_plugin_description_file(hardware_interface agv_pro_hardware.xml)
|
||||
|
||||
|
||||
+1
-1
@@ -159,7 +159,7 @@ private:
|
||||
size_t rr_idx_{3}; // physical Rear-Right
|
||||
|
||||
// ── Serial port ─────────────────────────────────────────────────────────────
|
||||
boost::asio::io_service io_;
|
||||
boost::asio::io_context io_;
|
||||
std::unique_ptr<boost::asio::serial_port> serial_port_;
|
||||
|
||||
// Protects all writes to the serial port (shared between write(), service
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<depend>std_msgs</depend>
|
||||
<depend>agv_pro_msgs</depend>
|
||||
<depend>tf2</depend>
|
||||
|
||||
<depend>libboost-dev</depend>
|
||||
|
||||
<export>
|
||||
<build_type>ament_cmake</build_type>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
#include "pluginlib/class_list_macros.hpp"
|
||||
#include "hardware_interface/types/hardware_interface_type_values.hpp"
|
||||
#include "tf2/LinearMath/Quaternion.h"
|
||||
#include "tf2/utils.h"
|
||||
#include "tf2/LinearMath/Quaternion.hpp"
|
||||
#include "tf2/utils.hpp"
|
||||
|
||||
PLUGINLIB_EXPORT_CLASS(
|
||||
agv_pro_hardware::AgvProHardwareInterface,
|
||||
|
||||
@@ -9,14 +9,14 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_compile_options(-Wall -Wextra -Wpedantic)
|
||||
endif()
|
||||
|
||||
# Qt5 boilerplate options from http://doc.qt.io/qt-5/cmake-manual.html
|
||||
# Qt6 boilerplate options from https://doc.qt.io/qt-6/cmake-manual.html
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
find_package(ament_cmake REQUIRED)
|
||||
find_package(geometry_msgs REQUIRED)
|
||||
find_package(pluginlib REQUIRED)
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
|
||||
find_package(rclcpp REQUIRED)
|
||||
find_package(rviz_common REQUIRED)
|
||||
find_package(rviz_default_plugins REQUIRED)
|
||||
@@ -41,7 +41,7 @@ add_library(${library_name} SHARED
|
||||
set(dependencies
|
||||
geometry_msgs
|
||||
pluginlib
|
||||
Qt5
|
||||
Qt6
|
||||
rclcpp
|
||||
rviz_common
|
||||
rviz_default_plugins
|
||||
@@ -49,19 +49,23 @@ set(dependencies
|
||||
rviz_rendering
|
||||
)
|
||||
|
||||
ament_target_dependencies(${library_name}
|
||||
${dependencies}
|
||||
target_link_libraries(${library_name}
|
||||
geometry_msgs::geometry_msgs
|
||||
pluginlib::pluginlib
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
rclcpp::rclcpp
|
||||
rviz_common::rviz_common
|
||||
rviz_default_plugins::rviz_default_plugins
|
||||
rviz_rendering::rviz_rendering
|
||||
)
|
||||
|
||||
target_include_directories(${library_name} PUBLIC
|
||||
${Qt5Widgets_INCLUDE_DIRS}
|
||||
${Qt6Widgets_INCLUDE_DIRS}
|
||||
${OGRE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(${library_name}
|
||||
rviz_common::rviz_common
|
||||
)
|
||||
|
||||
# Causes the visibility macros to use dllexport rather than dllimport,
|
||||
# which is appropriate when building the dll but not consuming it.
|
||||
target_compile_definitions(${library_name} PRIVATE "RVIZ_DEFAULT_PLUGINS_BUILDING_LIBRARY")
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<license>Apache-2.0</license>
|
||||
|
||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
||||
<build_depend>qtbase5-dev</build_depend>
|
||||
<build_depend>qt6-base-dev</build_depend>
|
||||
|
||||
<depend>geometry_msgs</depend>
|
||||
<depend>pluginlib</depend>
|
||||
@@ -19,10 +19,10 @@
|
||||
<depend>rviz_ogre_vendor</depend>
|
||||
<depend>rviz_rendering</depend>
|
||||
|
||||
<exec_depend>libqt5-core</exec_depend>
|
||||
<exec_depend>libqt5-gui</exec_depend>
|
||||
<exec_depend>libqt5-opengl</exec_depend>
|
||||
<exec_depend>libqt5-widgets</exec_depend>
|
||||
<exec_depend>libqt6-core</exec_depend>
|
||||
<exec_depend>libqt6-gui</exec_depend>
|
||||
<exec_depend>libqt6-opengl</exec_depend>
|
||||
<exec_depend>libqt6-widgets</exec_depend>
|
||||
|
||||
<test_depend>ament_lint_common</test_depend>
|
||||
<test_depend>ament_lint_auto</test_depend>
|
||||
|
||||
@@ -39,4 +39,8 @@ repositories:
|
||||
type: git
|
||||
url: https://github.com/unitreerobotics/unilidar_sdk2.git
|
||||
version: 0e3c51f512e6b8ff60b8c32f160b412cb48445c2
|
||||
transport_drivers:
|
||||
type: git
|
||||
url: https://github.com/ros-drivers/transport_drivers.git
|
||||
version: 0af598879560099b1069f9ad03d99f10684279ea
|
||||
|
||||
Reference in new issue
Block a user