53 Commits
Author SHA1 Message Date
Matt Spencer e2285c46f0 Harden base bring-up against CH340 control-transfer timeouts
The CH340 behind /dev/agvpro_controller rejects USB control transfers for up
to ~60s after a host reboot (kernel: "failed to send control message: -110"),
surfacing as TimeoutError from the TIOCMSET ioctl that clears DTR/RTS. Since
clearing DTR/RTS is what releases the ESP32's reset line, a single failed
attempt leaves the ESP32 held in reset and all its sensors silent.

can_power_on.py:
- open_serial_when_ready(): retry the open with backoff (60s budget) instead
  of dying on the first timeout. open_serial() now closes the fd if setup
  fails partway.
- try_power_on(): report success only when servo power is actually confirmed.
  Previously every failure path returned True ("assuming powered"), so a
  GET_POWER status of 0 followed by an unanswered POWER_ON still counted as
  success and the stack continued with the wheels unpowered.
- Retry the handshake 5 times before falling back to the permissive
  behaviour, and log loudly when it does.
- Never let a dead serial port block CAN bring-up. The wheel drives are on
  CAN and are not powered by this board, so a dead ESP32 must only cost
  IMU/voltage/IO/LED -- never the ability to drive.
- bring_up_can(): set the link down first so it is idempotent. The bitrate
  cannot be set on an already-UP link, so any restart where the link was
  still up aborted the launch and crash-looped the base stack.

agv_pro_hardware_interface.cpp:
- disable_dtr_rts(): retry briefly (2s budget), then continue rather than
  give up instantly. This runs in on_activate after AgvProWheelsSystem is
  already active, so a long block here starves the wheel read cycle until it
  errors out and the controllers lose their interfaces -- hence the small
  budget. can_power_on.py has normally already released the ESP32 by then.
2026-10-26 07:22:04 -07:00
Matt Spencer 8b0d1c363d Update wheel configuration in URDF 2026-10-20 14:01:10 -07:00
Matt Spencer c9144028f8 Initial fix of the lidar upgrade to Lyrical. Not yet tested. 2026-10-19 18:34:11 +01:00
Matt Spencer 46f7cbb8b5 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.
2026-10-19 17:48:21 +01:00
Matt Spencer bbcb753c94 Fix merge regression: restore iproute2 install and base-image upgrade step in Dockerfile
These were unintentionally dropped during the jazzy_mecanum_control merge when
a whole-file 'git checkout --theirs Dockerfile' was used to resolve a conflict
that only affected the colcon build cmake-args line. iproute2 provides the
`ip` binary that agv_pro_hardware/AgvProHardwareInterface and
agv_pro_bringup/can_power_on.py need at runtime to bring up the CAN interface.
2026-10-13 17:00:00 +00:00
Matt Spencer 8d9b4006f4 Merge branch 'merge-test-sim-control' into merge-test-final
# Conflicts:
#	.devcontainer/jazzy/Dockerfile.jazzy
#	patches/livox_ros_driver2.patch
#	patches/livox_sdk.patch
#	patches/unilidar_sdk2.patch
2026-10-13 16:38:22 +00:00
Matt Spencer 412e8e3078 Merge remote-tracking branch 'origin/jazzy_mecanum_control' into merge-test-sim-control
# Conflicts:
#	Dockerfile
#	patches/livox_ros_driver2.patch
#	patches/livox_sdk.patch
#	patches/unilidar_sdk2.patch
2026-10-13 16:37:02 +00:00
Matt Spencer 3f12a62044 First test of direct can control on the wheels 2026-10-13 16:22:44 +00:00
Matt Spencer 40620300ed Add gripper control for simulation. 2026-08-06 18:07:11 +00:00
Matt Spencer a27c7147c3 Update reference_timeout for physical robot. 2026-08-02 16:08:35 +00:00
Matt Spencer e50d0e2c27 Add reference timeout to get robot moving quicker, and switch to pose progress checker 2026-08-02 13:20:30 +00:00
Matt Spencer 7e1cad1536 Get nav2 running in simulation 2026-08-01 13:55:36 +00:00
Matt Spencer 44e039beac Fix upstream versions to enable patches to always apply 2026-07-31 17:49:20 +00:00
Matt Spencer 93e9291e19 Fix upstream for rodep install in devcontainer 2026-07-31 14:54:04 +00:00
Matt Spencer 6cf51a3b67 Fix livox driver build
Also add caching to the apt-get installs
2026-07-18 10:23:36 +00:00
Matt Spencer 48eb4d10fd Fix patch application in container. 2026-07-17 14:44:44 +00:00
Matt Spencer bd531ee9cb Update the livox patches. 2026-07-17 14:44:44 +00:00
Matt Spencer 02e944d1b1 Get fast_lio cmake execute the git submodule init 2026-07-17 14:44:44 +00:00
Matt Spencer e869d4d023 Patch to add symlinks to livox_ros_driver2 2026-07-17 14:44:44 +00:00
Matt Spencer 152451b134 Fix unilidar_sdk2 for jazzy colcon build 2026-07-17 14:44:44 +00:00
Matt Spencer 3d692c0083 Fix fast_lio for jazzy build 2026-07-17 14:44:44 +00:00
Matt Spencer 577453a553 Fix patch application in container. 2026-07-17 14:43:49 +00:00
Matt Spencer b0dfa63fb7 Update the livox patches. 2026-07-17 14:43:49 +00:00
Matt Spencer 2e7eba5fc4 Get fast_lio cmake execute the git submodule init 2026-07-17 14:43:49 +00:00
Matt Spencer 54f71524f5 Patch to add symlinks to livox_ros_driver2 2026-07-17 14:43:49 +00:00
Matt Spencer aae2455b68 Fix unilidar_sdk2 for jazzy colcon build 2026-07-17 14:43:49 +00:00
Matt Spencer a553dcce5c Fix fast_lio for jazzy build 2026-07-17 14:43:49 +00:00
Matt Spencer 24c330df91 Fix patch application in container. 2026-07-17 14:38:53 +00:00
Matt Spencer 2fffa0edb8 Update the livox patches. 2026-07-17 11:36:53 +00:00
Matt Spencer 6ca2d063d6 Get fast_lio cmake execute the git submodule init 2026-07-17 10:42:40 +00:00
Matt Spencer a9234a90be Patch to add symlinks to livox_ros_driver2 2026-07-17 10:23:25 +00:00
Matt Spencer b439d420df Fix unilidar_sdk2 for jazzy colcon build 2026-07-17 10:05:14 +00:00
Matt Spencer b3553348a0 Fix fast_lio for jazzy build 2026-07-17 09:34:33 +00:00
Matt Spencer 47274dcb36 Refactor the robot description, and include mecanum control. 2026-07-17 08:28:02 +00:00
Matt Spencer ecdbe00d07 Staging checkin
Moved to mechanum controller
Use a single URDF from the robot description
TODO: Wheel physics is not yet correct for mecanum movement.
2026-07-16 09:28:07 +00:00
Matt Spencer 9d62ca663f Staging checkin for the simulation migration 2026-07-16 07:50:16 +00:00
Matt Spencer 08bf9b81bc Add the ARG TARGETARCH to the deploy image build 2026-07-16 07:49:07 +00:00
Matt Spencer f97df2273b Create better caching of rosdep dependencies
For both  devcontainer and deployable container.
Also add ability to use docker from inside the devcontainer.
2026-07-16 07:47:35 +00:00
Matt Spencer c5c0ed092a Add the ARG TARGETARCH to the deploy image build 2026-07-16 07:24:34 +00:00
Matt Spencer f8beede100 Create better caching of rosdep dependencies
For both  devcontainer and deployable container.
Also add ability to use docker from inside the devcontainer.
2026-07-16 07:12:48 +00:00
Matthew Spencer 76701e81c0 Add initial 2026-07-15 14:10:00 +00:00
Matt Spencer a81b99cd3c Staging commit. Builds, deploys and wheels move.
Need to investigate lidar startup
2026-07-13 21:14:02 +00:00
Matt Spencer 31305f1f8d Move to upstream pcd2pgm 2026-07-13 09:46:53 +00:00
Matt Spencer 759f77f58a Add devcontainer 2026-07-13 09:42:48 +00:00
Matt Spencer f5c6fa19ac Use upstream lslidar repo 2026-07-13 09:41:53 +00:00
Matt Spencer fc0dc5746c use upstream livvox_ros-driver2 package 2026-07-11 21:22:21 +01:00
Matt Spencer d8c1bc3cca Use upstream pointcloud_to_laserscan 2026-07-11 20:46:16 +01:00
Matt Spencer ae3111229e use upstream slam_gmapping 2026-07-11 20:40:47 +01:00
Matt Spencer 426fe239a7 Upstream FAST_LIO 2026-07-11 20:26:19 +01:00
Matt Spencer b506c1d133 Use upstream point_lio_ros2 2026-07-11 20:16:13 +01:00
Matt Spencer b66deea825 Use upstream navigation2 2026-07-11 20:10:14 +01:00
Matt Spencer f58a638453 Migrate to use upstream teleop_twist_keyboard 2026-07-11 20:09:06 +01:00
Matt Spencer 9efe4a8e76 Start of refactor - remove upstream code and just contain deltas 2026-07-11 19:55:46 +01:00