2.7 KiB
2.7 KiB
TODO
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.jazzy.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).