Quick setup guide for running Mars 2020 stereo mesh generation.
- Docker or Podman installed
- 8GB RAM minimum (16GB recommended)
- M2020 stereo images (NavCam or Mastcam-Z)
docker pull ghcr.io/nasa-ammos/tig/terrain-intelligence-generator:opensourcecd terrain-intelligence-generator/docker
docker build -t terrain-intelligence-generator:opensource .Note: Local build requires vicario.jar (see Vicario Reference)
Get M2020 stereo images from PDS or use sample data:
# Sample NavCam stereo pair locations:
# Left: NLM_<SCLK>_*FDR_*.VIC
# Right: NRM_<SCLK>_*FDR_*.VIC./demo-mesh-generation-with-xyz.sh \
--stereo-left /path/to/left.VIC \
--stereo-right /path/to/right.VICProcessing time: ~10 minutes for 1280x960 images
# Check output
ls workspace/
# terrain.obj - 3D mesh (~273M)
# terrain.mtl - Material file
# texture.png - Texture (1280x960)
# pointcloud.xyz - XYZ data (~15M)
# View mesh
meshlab workspace/terrain.obj
# or
blender workspace/terrain.obj-
Stereo Correlation (marscorr + marscor3)
- Matches features between left/right images
- Generates disparity map
- ~8 minutes
-
XYZ Generation (marsxyz)
- Converts disparity to 3D coordinates
- Filters outliers
- ~1 minute
-
Mesh Creation (marsmesh)
- Triangulates point cloud
- Applies texture
- ~30 seconds
-
Format Conversion (vicario)
- Converts VICAR to PNG
- <1 second
docker: Error response from daemon: Conflict. The container name "/tig-mesh-demo" is already in useSolution:
docker stop tig-mesh-demo && docker rm tig-mesh-demono additional memory availableSolution: Increase Docker memory limit to 16GB or use lower resolution images
ERROR: MARS calibration not foundSolution: Ensure calibration files are in terrain-intelligence-generator/docker/mars_calibration_m20/
- Mesh Generation Demo - Detailed walkthrough
- Command Reference - Available VICAR tools
- Vicario Reference - Image format conversion
Mount your own M2020 calibration:
docker run -v /path/to/calib:/usr/local/vicar/mars_calib:ro ...Skip correlation if you have XYZ files:
./demo-mesh-generation-with-xyz.sh \
--xyz pointcloud.IMG \
--texture image.IMGSee demos/mesh-generation.md for details.