Skip to content

This is the multi-page printable view of this section. .

Return to the regular view of this page.

2026 RAICOM Reconnaissance

ROS software architecture, operating guide, and module notes for the vehicle. Read alongside the raicom2026 GitHub repository.

Vehicle ROS documentation for the RAICOM Intelligent Reconnaissance event. Source: RyanYhy/raicom2026.

Reading order

Follow the sidebar or the list on this page: overview, usage, each module, summary, then the appendix.

Overview

Layered architecture, data flow, prep/go, and runtime state.

→ Read the overview

Usage

Environment, three workspaces, conda, build, and the two-stage start.

→ Read the usage guide

Hardware and drivers

Devices, udev, driver packages, EKF, and the TF tree.

→ Read hardware and drivers

Mapping

Match maps map2.yaml / map2.pbstream and the Cartographer toolchain.

→ Read mapping

Localization

Cartographer pure localization, AMCL, and the loc_mode switch.

→ Read localization

Navigation

move_base, costmaps, the anti-tank point cloud, and the cmd_vel chain.

→ Read navigation

Match tasks

Person detection and shooting, mine counting, anti-tank avoidance, and the 6-line report.

→ Read match tasks

Summary

Module dependencies, where to change things, and the main entry points.

→ Read the summary

Appendix

Unfinished features and a function-to-file index.

→ Read the appendix

1 - Overview

RAICOM 2026 Intelligent Reconnaissance — mission, layers, data flow, and runtime state.

Vehicle ROS software for the RAICOM Intelligent Reconnaissance event. Within five minutes the robot crosses zones A–D, recognizes people and fires water pellets, counts mines, detects anti-tank obstacles and avoids them, then writes a byte-exact 6-line report.txt.

  • Platform: ROS Melodic · Ubuntu 18.04 · catkin workspace 1raicom_ws
  • Repository: raicom2026

What the system does

The match is three pipelines:

  1. Navigation — cruise the preset waypoints (move_base + Cartographer)
  2. Perception — at a task waypoint, run vision (people / mines / anti-tank)
  3. Output — each task writes a partial report, then the parts merge into a 6-line report.txt

Startup has two stages. prep brings up every sensor and model. After the referee starts the clock, go starts only the navigation orchestrator, so the robot can leave within seconds.

Seven layers
Layers from hardware up to the match tasks

Layers

LayerContentsMain location
M1 HardwareMecanum chassis, IMU, 2D lidar, gimbal gun, webcam, Orbbecconfig/udev/
M2 DriversSerial, lidar, and camera drivers, odometrychassis_driver, imu_driver, leishen/, orbbec_camera
M3 FusionEKF: odom_raw + IMU → /odomrobot_localization
M4 ModelURDF and static TFrobot_description
M5 Localization and navigationMap, Cartographer, move_baseraicom2026/launch/, robot_navigation/
M6 Match tasksNavigation orchestration, vision, reportraicom2026/scripts/
M7 Operationsprep/go and calibration toolsscripts/, test/

Data flow

Data flow
Sensors to fusion, localization, planning, and the chassis. Navigation calls vision through services.

Sensors → fusion → localization → planning → chassis

  • Lidar /scan, IMU, and odom_raw pass through the EKF to produce /odom
  • Cartographer publishes map → odom
  • move_base outputs /move_base/cmd_vel → cmd_vel_merge → /cmd_vel → chassis

Task triggers are services, not continuous topics. nav_competition.py calls /person_detect_service, /mine_detect_service, and /antitank_check_service.

Two cameras

Two cameras
CameraMountModelTask
Gimbal webcamTurns with the servosperson.onnxPerson detection and water-pellet shooting in zones A–D
Gimbal webcamSame mountmine.onnxMine counting in zones A/B
Orbbec DCW2Fixed on the noseantitank.onnxAnti-tank detection, then costmap avoidance

prep / go

prep and go
StageCommandWhat it does
prepstart_match_prep.shBackground main launch: sensors, models, localization, move_base
gostart_match_go.shClear reports and start only nav_competition.py

See Usage.

Runtime state

stateDiagram-v2
    [*] --> BOOT
    BOOT --> NAV: map ready + move_base
    NAV --> TASK: task waypoint
    TASK --> NAV: detection done
    NAV --> REPORT: course done or budget spent
    REPORT --> DONE: assemble report.txt
    DONE --> [*]

State topic: /nav_competition/state (for example NAV:P3, TASK:人物A).

2 - Usage

Environment, build, udev, the prep/go start sequence, and syncing the PC with the robot.

The default workspace is ~/1raicom_ws (same layout as raicom2026).

Requirements

ComponentNotes
OSUbuntu 18.04
ROSMelodic
This repository1raicom_ws (catkin root)
~/cartographer_wsCartographer localization (not in this repository)
~/cv_bridge_wsPython 3 cv_bridge for the YOLO node
Conda yolov8ONNX inference
Environment overlay
Overlay order in setup_env.sh

One environment entry

In every new terminal:

source ~/1raicom_ws/scripts/setup_env.sh

setup_env.sh overlays ROS, then cartographer, then 1raicom_ws, then cv_bridge, and forces 1raicom_ws to the front of ROS_PACKAGE_PATH.

Build

cd ~/1raicom_ws
source /opt/ros/melodic/setup.bash
catkin_make
First parallel build of lslidar

If it fails, run catkin_make once more.

Devices and udev

Rules live in config/udev/:

DeviceNode
Chassis/dev/carserial
IMU/dev/imu
Lidar/dev/lslidar
Gimbal gun/dev/gun
Webcam/dev/video*
OrbbecUSB 2bc5
bash ~/1raicom_ws/scripts/check_devices.sh

Match start (two stages)

prep and go

prep

source ~/1raicom_ws/scripts/setup_env.sh
bash ~/1raicom_ws/scripts/start_match_prep.sh
  • Background nav_competition_2026.launch (start_nav:=false, loc_mode:=cartographer)
  • The script exits after person_detect_service is ready. The prep process keeps running.
  • Log: /tmp/prep.log

go

bash ~/1raicom_ws/scripts/start_match_go.sh
  • Clears src/raicom2026/data/reports/
  • Starts only match_go.launch → nav_competition.py

Clean up

bash ~/1raicom_ws/scripts/clean_ros.sh

Maps and models

AssetPath
Match mapsrc/raicom2026/data/maps/map2.yaml
pbstreamsrc/raicom2026/data/maps/map2.pbstream
ONNXdata/models/person.onnx, mine.onnx, antitank.onnx
Waypointsparam/nav_competition.yaml
Reportdata/reports/report.txt

Read these first after clone

FileRole
scripts/setup_env.shEnvironment
scripts/start_match_*.shMatch entry points
launch/nav_competition_2026.launchMain launch
param/nav_competition.yamlWaypoint course
scripts/nav_competition.pyNavigation orchestrator

Sync the PC and the robot

  1. Edit on the PC, then git push
  2. PC → robot: scp src/, scripts/, and config/
  3. On the robot, catkin_make and source setup_env.sh
Note

The robot usually cannot reach GitHub. Do not git push from the robot.

3 - Hardware and drivers

On-robot devices, udev, driver packages, EKF fusion, and the TF tree.

Hardware

DeviceRoleudev node
Mecanum chassisOmnidirectional motion/dev/carserial
Wit IMUAttitude and angular rate/dev/imu
Leishen N10_P2D lidar/dev/lslidar
Gimbal and water-pellet gunAim and fire/dev/gun
USB cameraPeople and mines (on the gimbal)/dev/video*
Orbbec DCW2Anti-tank RGB and depthUSB 2bc5
Hardware and drivers

Driver packages

ROS packageNodeOutput
chassis_driverbase_controller.pySerial chassis
imu_driverwit_multi_ros.py/imu
leishen/lslidar_driverLidar node/scan
car_bringupbase_nodeodom_raw
orbbec_cameraSDK driver/camera/color/*, /camera/depth/*
robot_bringupbringup_robot.launchBrings up the rows above, plus EKF and URDF

Bringup chain

bringup_robot.launch:

lslidar → imu → base_controller → odom_raw → EKF → /odom
       → static TF → robot_state_publisher

The main launch pulls this in with <include>.

EKF

ItemNotes
Noderobot_localization / ekf_localization_node
Inputodom_raw + /imu
Output/odom

Parameters: robot_localization.yaml

URDF and TF

map → odom → base_footprint → base_link → laser_link
                           → camera_link → camera_color_optical_frame

The webcam sits on the gimbal and has no TF frame of its own. Detection uses the servo angles.

Gimbal serial port

/dev/gun can be opened by only one process. gimbal_server.py owns it.

4 - Mapping

Match maps map2.yaml / map2.pbstream and the Cartographer mapping toolchain.

Match maps

FileRole
data/maps/map2.yamlOccupancy grid for map_server
data/maps/map2.pbstreamCartographer pure localization

Both files must come from the same mapping run. After replacing the map, remeasure the waypoints (nav_competition.yaml).

Toolchain

The mapper itself is the external workspace ~/cartographer_ws. This repository provides:

LocationContents
config/cartographer/Lua configuration
scripts/save_map.shSave yaml and pgm
scripts/save_pbstream.shSave pbstream
test/launch/cartographer_localization.launchDebug pure localization

Mapping steps

flowchart LR
    A[robot laser+odom] --> B[cartographer_ros]
    B --> C[map2.pbstream]
    B --> D[map2.yaml]
    D --> E[map_server]
    C --> F[pure localization]
  1. Map the field online with Cartographer
  2. Save pbstream and yaml
  3. Copy them into raicom2026/data/maps/
  4. Mark waypoints with mark_waypoint*.py

How the match launch uses the map

nav_competition_2026.launch defaults to:

  • map → map2.yaml
  • pbstream → map2.pbstream
  • With loc_mode:=cartographer, cartographer_node loads the pbstream

5 - Localization

AMCL and Cartographer pure localization, helper nodes, and the handoff to navigation.

nav_competition_2026.launch switches mode with loc_mode:

ModeArgumentNotes
Cartographerloc_mode:=cartographer (match default)Loads map2.pbstream
AMCLloc_mode:=amclParticle filter on the static map
Localization modes

prep always uses:

roslaunch raicom2026 nav_competition_2026.launch start_nav:=false loc_mode:=cartographer

Cartographer helper nodes

NodeRole
odom_cleaner.pyClean timestamps on /odom
carto_init.pyInject the starting pose
carto_relocalize.pyManual relocalization from RViz 2D Pose Estimate

Configuration: config/cartographer/localization.lua

Handoff to nav_competition

When nav_competition.py starts it:

  1. Waits for /map
  2. Connects to move_base
  3. Publishes the initial pose
  4. Waits about 3 seconds for convergence
  5. Cruises the course

In Cartographer mode, anti-tank detection also uses /tracked_pose to convert into the map frame.

6 - Navigation

move_base, costmaps, the anti-tank point cloud, and the cmd_vel chain.

Core pieces

PieceRole
map_serverPublishes /map
move_baseGlobal planner plus DWA local planner
robot_navigation/param/Costmap and DWA parameters
visual_layer_params.yamlLocal costmap subscribes to /visual_mine/obstacles

The main launch owns move_base (clear_params=true) and loads the visual-layer parameters last.

Costmaps

Layerobservation_sourcesNotes
globalempty (static map only)Avoid marking obstacles from localization drift
localscan + visual_mineLidar plus the anti-tank cloud

orbbec_mine_antitank.py publishes the anti-tank cloud once at P21 (map frame, republished every 0.5 s).

Note

visual_mine_avoidance.py does start during prep, but enable_at=false, so it does not publish the match cloud.

cmd_vel chain

cmd_vel chain
move_base → /move_base/cmd_vel → cmd_vel_merge → /cmd_vel → base_controller

cmd_vel_merge.py currently has enable_line_follow=false and only forwards velocity.

nav and move_base

  • Waypoints: nav_competition.yaml
  • Goals go out through actionlib as MoveBaseGoal. A failed stop is skipped and the report is filled with 0.
  • At a task stop the robot aligns its heading before vision runs.

7 - Match tasks

Orchestrator, person, mine, and anti-tank detection, the gimbal service, and the 6-line report.

Most of this code is in the raicom2026 package. Repository

Task service flow

Orchestrator nav_competition

ItemNotes
Confignav_competition.yaml
go launchmatch_go.launch
Task typesperson (A–D), mine (A/B), antitank
ServiceNode
/person_detect_servicewebcam_person_gun.py
/mine_detect_serviceorbbec_mine_antitank.py
/antitank_check_serviceorbbec_mine_antitank.py

Gimbal service gimbal_server

  • Exclusive owner of /dev/gun
  • /gun/aim, /gun/fire, /gun/home
  • People and mines share the gimbal

People and shooting

webcam_person_gun.py

ItemNotes
Camera/usb_cam/image_raw (848×480 MJPG)
Modelperson.onnx
FlowScan and count → exact report string → aim and fire at the enemy

Shooting and recognition live in the same node. The node does not write the serial port itself.

Mines

The mine half of orbbec_mine_antitank.py:

ItemNotes
CameraGimbal webcam
GimbalA (70,70), B (175,70)
Modelmine.onnx
Report"A雷区未排雷数量x个,已经排雷数量x个" (ASCII comma)

Anti-tank avoidance

The antitank half of the same script, plus move_base:

ItemNotes
CameraOrbbec color and depth
TriggerP21 /antitank_check_service
Output/visual_mine/obstacles → local costmap

Report

report.py and assemble_report.py produce a report.txt of exactly 6 lines.

Two cameras

8 - Summary

Module dependencies, where to change the stack, and the main entry points.

Dependencies

flowchart TB
    subgraph HW [hardware and drivers]
        BR[robot_bringup]
    end
    subgraph LOC [localization]
        CARTO[cartographer]
        MAP[map_server]
    end
    subgraph NAV [navigation]
        MB[move_base]
    end
    subgraph TASK [match tasks]
        NAVCOMP[nav_competition]
        PERSON[webcam_person_gun]
        MINEAT[orbbec_mine_antitank]
    end
    BR --> CARTO
    MAP --> MB
    CARTO --> MB
    NAVCOMP --> MB
    NAVCOMP --> PERSON
    NAVCOMP --> MINEAT
    MINEAT --> MB

Where to change things

GoalChange
Waypoints or timeoutsOnly nav_competition.yaml
RecognitionThe matching scripts/*.py plus data/models/*.onnx
Navigationrobot_navigation/param/ and the launch files
A new featurePrefer the raicom2026 package
Site and repository

This site organizes the notes with Oink. Code changes belong in the GitHub repository. The file index is in the appendix.

Entry points

UsePath
Environmentscripts/setup_env.sh
prep/goscripts/start_match_*.sh
Main launchlaunch/nav_competition_2026.launch

9 - Appendix

Unfinished features and a function-to-file index.

Unfinished features

Yellow-line following

PieceState
visual_mine_avoidance.pyStarts in prep and publishes /visual_line/*
cmd_vel_merge.pyenable_line_follow=false
Match effectNone. Velocity is only forwarded.

visual_mine_avoidance

CapabilityState
Always-on anti-tank inferenceenable_at=false
Match point cloudPublished by orbbec_mine_antitank
benchroslaunch raicom2026 visual_mine_avoidance.launch

Function to file

To change or inspectPath (from the repository root)
Waypoints and timeoutssrc/raicom2026/param/nav_competition.yaml
Navigation orchestratorsrc/raicom2026/scripts/nav_competition.py
People and shootingsrc/raicom2026/scripts/webcam_person_gun.py
Mines and anti-tanksrc/raicom2026/scripts/orbbec_mine_antitank.py
Gimbalsrc/raicom2026/scripts/gimbal_server.py
Reportsrc/raicom2026/src/raicom2026/report.py
Main launchsrc/raicom2026/launch/nav_competition_2026.launch
move_base parameterssrc/robot_navigation/param/
Mapssrc/raicom2026/data/maps/map2.*
prep/goscripts/start_match_*.sh

The full tree is in the GitHub repository.

Topics and services

NameNotes
/cmd_velTo the chassis
/usb_cam/image_rawGimbal camera
/camera/color/image_rawOrbbec
/visual_mine/obstaclesAnti-tank cloud
/person_detect_servicePerson task
/mine_detect_serviceMine task
/antitank_check_serviceAnti-tank