Minecraft costmap service
This Robonix service turns the Forge Mod's exact odometry and 32FC1 depth
stream into a Nav2-compatible 2D occupancy grid. It is intentionally not a
SLAM implementation: Minecraft already supplies drift-free world position,
so the service only performs depth projection, free-space raytracing, and
log-odds occupancy updates. Free-space projection stops each sampled image
column at its nearest obstacle within the configured height range so farther
ground in the same frame does not clear cells behind a wall. Confirmed occupied
cells also stop later free-space rays and are retained during robot footprint
clearing, preventing motion along a wall from exposing unknown space behind it.
The default grid is 128 m square at 0.25 m resolution and is anchored around the first odometry pose. It publishes:
/minecraft/map/poseasgeometry_msgs/PoseWithCovarianceStamped/minecraft/mapas latchednav_msgs/OccupancyGrid
Both topics are declared through the existing robonix/service/map/*
contracts. Inputs are resolved from Atlas rather than hardcoded.
Compatibility
- ROS 2 Jazzy
- Robonix development baseline
74b4ca0f7c0db3c237730321753501e12646c626
The service tracks the latest Robonix development version. Compatibility is verified again for every service release.
Build
With rbnx installed and configured against a compatible Robonix source tree:
rbnx validate .
rbnx build -p .
The build generates ROS 2 bindings and runs the pure mapping tests. Runtime initialization additionally requires active depth, camera extrinsics, and chassis odometry providers discoverable through Atlas.
Configuration
resolution: cell size in metres, default0.25.size_m: fixed square map width, default128.vertical_fov_deg: Minecraft view field of view, default70.pixel_stride: depth subsampling interval, default12.min_depth_m,max_depth_m: accepted forward depth range, defaults0.2and32.min_obstacle_height_m,max_obstacle_height_m: occupied endpoint height above the inferred ground, defaults0.15and2.5.nominal_eye_height_m: eye height used to infer ground, default1.62.robot_clear_radius_m: footprint kept free except for confirmed occupied cells, default0.4.publish_interval_sec: minimum grid publication interval, default0.5.odom_match_tolerance_sec: maximum accepted time difference between a depth frame and its bracketing odometry samples, default0.25.input_timeout_sec: Atlas input resolution timeout, default30.pose_topic,occupancy_grid_topic: optional output topic overrides.
The complete accepted configuration, including units and validation ranges,
is documented in config.spec.
Provenance
This service was extracted from
examples/minecraft-mod/services/minecraft_costmap in syswonder/robonix at
commit e30b99b4ca606d5a3463e9c42d7df2de81d680c4. It is distributed under the
MulanPSL-2.0 license included in this repository.