-
Notifications
You must be signed in to change notification settings - Fork 7
feat: FASTLIO2 support with arm64 and hardware-verified localization #1149
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
base: dev
Are you sure you want to change the base?
Conversation
Verified working: ./start.sh --hardware --tag humble-fastlio --route-planner - Add docker-compose.deploy.yml for pre-built Docker Hub images - Update build.sh with --fastlio/--arise SLAM type selection - Update start.sh with --tag, --route-planner options - Add FASTLIO2 autonomy bridge, terrain analysis, FAR planner launches - Support for Unitree robot via USE_UNITREE env var
- build.sh now exports IMAGE_TAG="${ROS_DISTRO}-${SLAM_TYPE}"
- start.sh uses local dimos_autonomy_stack:${IMAGE_TAG} image
- docker-compose.yml uses IMAGE_TAG for both simulation and hardware
- Removed Docker Hub pull, prompts user to build if image missing
- Dockerfile builds both SLAM systems in single image - LOCALIZATION_METHOD env var selects arise_slam (default) or fastlio - IMAGE_TAG simplified to just ROS_DISTRO (e.g., humble, jazzy) - build.sh uses fastlio2 branch which has both SLAM systems - start.sh --arise/--fastlio flags set LOCALIZATION_METHOD
The $SLAM_ARG variable wasn't expanding correctly in docker-compose command. Fixed by directly embedding the launch argument based on LOCALIZATION_METHOD env var.
- Add --bagfile flag to start.sh for bagfile playback (use_sim_time=true) - Add dimos_bagfile service to docker-compose.yml - Add MAP_PATH env var and ./maps volume mount for localization mode - Support --fastlio, --route-planner, --rviz flags in bagfile mode
ros-base image doesn't include rviz2, causing build failure for teleop_rviz_plugin and other rviz-dependent packages. Added conditional install that only runs on arm64, with ARG placement optimized for layer caching.
The tare_planner package includes pre-built or-tools binaries for x86_64. On arm64, these fail to link with 'file in wrong format' error. Added conditional build steps for arm64: - Build or-tools v9.8 from source with BUILD_DEPS=ON - Replace x86_64 libraries/headers with arm64 build - Disabled SCIP and COINOR (not needed for routing/TSP solver)
Launch files reference joy_node for joystick input but the joy package was not installed in the runtime stage, causing launch failure.
open3d 0.18.0 has aarch64 wheels for Python 3.8-3.11 (Humble works). open3d 0.19.0 dropped aarch64 Linux wheels entirely. No version has aarch64 wheels for Python 3.12 (Jazzy). Pin to 0.18.0 and build from source only when arm64 + Python >= 3.12.
open3d==0.18.0 was removed from PyPI; only 0.19.0 is available for x86_64 / Python 3.12, breaking the Docker build on amd64. Remove the version pin so pip resolves the latest compatible release. open3d version handling per platform: - amd64 (humble/jazzy): installs from PyPI (currently 0.19.0) - arm64 + jazzy (Python 3.12+): built from source (v0.18.0) in Dockerfile, satisfies the unversioned requirement - arm64 + humble (Python 3.10): installs from PyPI (aarch64 wheels available for older Python)
GLFW requires Xinerama, Xcursor, Xrandr, Xi headers even when BUILD_GUI=OFF. Only affects arm64 + Python 3.12+ builds.
…open3d build - Use Open3D's own dependency installer for completeness - Cap make jobs at 4 to avoid OOM on arm64 - Disable WebRTC module (not needed)
Greptile OverviewGreptile SummaryThis PR adds comprehensive FASTLIO2 support alongside the existing arise_slam, enabling runtime SLAM method selection via Major Changes:
Key Implementation Details:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant build.sh
participant start.sh
participant Docker
participant Container
participant ROS2
Note over User,ROS2: Build Phase
User->>build.sh: ./build.sh --jazzy
build.sh->>build.sh: Clone/update ros-navigation-autonomy-stack (fastlio2 branch)
build.sh->>Docker: docker compose build
Docker->>Docker: Build multi-arch image (amd64/arm64)
alt arm64
Docker->>Docker: Build open3d from source
Docker->>Docker: Build or-tools from source
end
Docker->>Docker: Build arise_slam + FASTLIO2
Docker->>Docker: Copy configs for both SLAM methods
Docker-->>build.sh: Image: dimos_autonomy_stack:jazzy
Note over User,ROS2: Runtime Phase (Hardware Mode)
User->>start.sh: ./start.sh --hardware --localization fastlio --route-planner
start.sh->>start.sh: Set LOCALIZATION_METHOD=fastlio
start.sh->>start.sh: Validate .env file exists
start.sh->>start.sh: Check lidar configuration
start.sh->>start.sh: Verify image exists
start.sh->>Docker: docker compose --profile hardware up
Docker->>Container: Start with LOCALIZATION_METHOD env
Container->>Container: source ROS workspace
alt LOCALIZATION_METHOD=fastlio
Container->>ROS2: ros2 launch system_real_robot_with_route_planner.launch.py use_fastlio2:=true
ROS2->>ROS2: Start FASTLIO2 SLAM
else LOCALIZATION_METHOD=arise_slam
Container->>ROS2: ros2 launch system_real_robot_with_route_planner.launch.py
ROS2->>ROS2: Start arise_slam
end
Container->>ROS2: Start route planner (FAR planner)
alt USE_RVIZ=true
Container->>ROS2: ros2 run rviz2 rviz2
end
Container->>ROS2: Start Foxglove bridge
ROS2-->>User: Navigation system ready
Note over User,ROS2: Bagfile Playback Mode
User->>start.sh: ./start.sh --bagfile --localization fastlio
start.sh->>Docker: docker compose --profile bagfile up
Docker->>Container: Start with use_sim_time=true
Container->>ROS2: ros2 launch system_bagfile.launch.py use_fastlio2:=true
User->>Container: ros2 bag play --clock bagfile
ROS2->>ROS2: Process bagfile with FASTLIO2
|
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.
4 files reviewed, 6 comments
|
DO NOT MERGE UNTIL VERIFIED ON G1 (JETSON) |
- Replace --humble/--jazzy with --image <distro> - Replace --arise/--fastlio with --localization <method> - Remove redundant --tag flag - Group help text by mutually exclusive options - Cap or-tools build parallelism to 4 (match open3d/ceres) - Abort build if local changes in autonomy stack (instead of git reset --hard) - Remove redundant git remote add in build.sh - Update README with new CLI syntax
…onalOS Update build.sh to clone from dimensionalOS/ros-navigation-autonomy-stack instead of VectorRobotics/vector_navigation_stack. Remove redundant vector remote setup.
|
@greptile, @greptile-app. Update to address comments. Please review. |
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.
4 files reviewed, 2 comments
Summary
LOCALIZATION_METHOD)MAP_PATHsupport for localization with pre-built PCD mapsros-joyruntime dependencyTest plan
MAP_PATHverifieduse_sim_timeverified