Skip to content

Simulation + mapping scripts layout cleanup - #127

Merged
YellowAli merged 45 commits into
mainfrom
ml/cleaning-up-structure
Dec 1, 2026
Merged

YellowAli merged 45 commits into
mainfrom
ml/cleaning-up-structure

Conversation

@YellowAli

@YellowAli YellowAli commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

What

Reorganizes simulation/ into folders and splits scripts/map_carla.sh so each file has one job. No behaviour changes.

simulation/

  • common/: code both steps use (carla_frames.py, sensor_config.py)
  • recorder/: code only record_bag.py uses (route.py, carla_sensors.py, bag_writer.py, plus carla_connection.py, which was split out of carla_frames.py)
  • record_bag.py / filter_bag.py stay at the top as the two entry points; imports updated
  • The large README is split into short pages that link to each other: README.md (overview), recorder/, FILTER.md, common/, config/, tests/. Nothing was dropped; it was moved.

scripts/

  • lib/preflight.sh (new): setup checks other scripts can source (source_ros, require_pkg, require_python_module, warn_low_disk, stop_leftovers, wait_for_exit)
  • summarize_run.py (new): the end-of-run summary, which used to be a Python heredoc inside map_carla.sh
  • map_carla.sh: now just glue (flags → checks → params → record → LIO-SAM → summary), with comments explaining each part and why it's bash. evo is unchanged; that gets its own PR.
  • scripts/README.md has a new Mapping table

Small fixes

  • SETUP.md / map_carla.sh: the example map_carla.sh Town02 --short was missing --map, and Town02 crashes CARLA 0.9.16, so it now says --map Town01 --short
  • README paths updated in filter_bag.py messages, the YAML comments, src/mapping/config/lio_sam_carla.yaml and src/mapping/README.md

Testing

  • python3 -m pytest simulation/tests: 29 passed
  • map_carla.sh --dry-run (with --map and with --bag) prints the same commands as before
  • Every preflight check, made to fail on purpose, prints its message and exits 1; set -u is restored after sourcing ROS
  • summarize_run.py output is identical to the old heredoc on the same results
  • A full map_carla.sh run with run_lio_sam.py replaced by a stand-in, so LIO-SAM didn't actually run: the success path prints the summary; the failure path exits 1 with the hint; --paper-imu still patches the 4 IMU values

boots962 and others added 30 commits October 27, 2026 20:56
- Missing IMU orientation is now an error, since LIO-SAM needs it.
- Configs are validated on load: unknown keys, missing required keys
  (including bias_correlation_time and orientation.correlation_time,
  which no longer default to 1 s), wrong types and wrong units.
- Raw bags must have /clock and /tf_static, with each sensor frame
  under the vehicle frame; a 0.1 s lidar tick or a slow IMU is an
  error. Missing ground truth still only warns.
Add CARLA bag filter to mimic kart LiDAR and IMU
Add LIO-SAM paper-bag params and updated setup docs
@YellowAli
YellowAli requested review from a team as code owners November 29, 2026 17:12
@HamzaKababji HamzaKababji added the Mapping Related to Mapping Changes label Nov 29, 2026

@HamzaKababji HamzaKababji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the split makes sense

thanks for cleaning it up chat

@YellowAli
YellowAli merged commit b0b2306 into main Dec 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mapping Related to Mapping Changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants