7.9 KiB
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:
re-enabled, builds clean under lyrical (FAST_LIO(patches/fast_lio.patch)ament_target_dependencies()guarded withif(COMMAND ...)+ modern namespaced targets;tf2_ros/transform_broadcaster.h→.hpp; added missingtf2_rosdepend; dropped unusedpcl_ros/rclcpp_componentslink targets which don't export a simple umbrella target under lyrical).re-enabled, builds clean under lyrical (extended its existinglivox_ros_driver2(patches/livox_ros_driver2.patch)DISTRO_ROS STREQUAL "humble" OR "jazzy"modern-rosidl-typesupport guard to also match"lyrical").re-enabled, builds clean under lyrical (neededlivox_sdk(patches/livox_sdk.patch)cmake_minimum_requiredbumped from 3.0 to 3.5 in several sub-CMakeLists — CMake 4.2 fully removed compatibility with versions below 3.5).re-enabled, builds clean under lyrical (Lslidar_ROS2_driver(patches/lslidar_ros2_driver.patch, new)ament_target_dependenciesguarded withif(COMMAND...)+ modern namespaced targets in both thelslidar_driverlibrary andlslidar_driver_nodeexecutable; also neededlibpcap0.8-devinstalled -- the package.xml'slibpcaprosdep key resolves to it, but it wasn't inrosdep-packages.txtyet since this package was previously COLCON_IGNORE'd when that file was last frozen).re-enabled, builds clean under lyrical (samepoint_lio_ros2(patches/point_lio_ros2.patch, new)ament_target_dependencies/modern-target-link pattern asFAST_LIO;tf2_ros/transform_broadcaster.h\u2192.hppin 3 files; plus a new fix not needed byFAST_LIO: added an explicitfind_package(PCL REQUIRED COMPONENTS common io filters)+target_link_libraries(${PCL_LIBRARIES}), since this package never had its own PCL linkage and relied on legacyament_target_dependenciestransitively pulling it in viapcl_conversions).re-enabled, builds clean under lyrical (unilidar_sdk2(patches/unilidar_sdk2.patch)unitree_lidar_ros2'sament_target_dependenciesguarded withif(COMMAND...)+ modern namespaced targets;unitree_lidar_sdkonly exports legacyament_export_libraries()/ament_export_include_directories()variables (no namespaced target), so it's linked via explicit${unitree_lidar_sdk_LIBRARIES}/${unitree_lidar_sdk_INCLUDE_DIRS};tf2_ros/transform_broadcaster.h→.hppandtf2/LinearMath/Quaternion.h→.hppinunitree_lidar_ros2.h). All 6 lidar packages are now re-enabled and the full workspace builds clean (31/31 packages).
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.
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-contextare actually published, consider dropping the vendoredtransport_driversin favor of the apt packages again (re-run./scripts/freeze-rosdep.shto 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-cameratorosdep-packages.txtonce 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" #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
CAN wheel control (agv_pro_can service / wheel_interface:=can)
Switched from an unverified CANopen approach (agv_pro_canopen_config/ros2_canopen,
now removed) to the RobStride private protocol via the community robstride_ros2
package, after empirically confirming real CAN communication with the wheel drives
(RobStride RS01 motors, CAN IDs 1-4, direction-confirmed via candump -x; see
/memories/repo/agv_can_serial_hw_notes.md). Remaining before this is production-ready:
- Determine which physical wheel corner each CAN ID (1-4) actually drives — VERIFIED
by rotating each wheel in turn and watching
scripts/hw_debug/robstride_rotation_watch.py: 1=front_left, 2=front_right, 3=rear_left, 4=rear_right (matches the xacro default). - Confirm per-wheel
direction(sign) — all 4 wheels rotated the same physical "forward" way; raw mechpos was negative for left-side motors (1,3) and positive for right-side motors (2,4), consistent with mirrored motor mounting. Setdirection=-1for IDs 1/3 anddirection=1for IDs 2/4 in the xacro. LIVE-VALIDATED byscripts/hw_debug/robstride_spin_test.py: commanded all 4 motors forward at 2 rad/s for 4s using this sign convention and all 4 wheels visually spun forward together (user-confirmed). Note: this validated the raw protocol-level sign convention via a standalone script bypassingros2_control; therobstride_ros2driver's owndirectionxacro param still needs a realros2_controlbuild/test to confirm it applies the same convention end-to-end. - Determine real
gear_ratio(currently 1.0 placeholder) from the drivetrain so commanded/measured velocity is in correct SI units at the wheel. - Tune
kp/kdvelocity-mode gains (currently placeholderkp=0.0 kd=0.8) for the real mecanum drivetrain. - Confirm
can_timeout_ticks(currently the package default, 4000 ticks = 200 ms) is an appropriate watchdog window for this platform. - Build-test:
colcon buildwill buildrobstride_ros2andros2_socketcanfrom source perupstream.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:=canactually drives all four wheels through the fullros2_control/mecanum_drive_controllerstack (only ad-hoc Python/CAN scripts have been validated against the hardware so far, not the ROS2 stack itself).