MARV – MARV Analytics, Retrieval, and Visualisation platform
- bag files ROS1 and ROS2
- extend to any other format
Three flavours:
- Enterprise Edition https://ternaris.com/marv-robotics
- MARV.Automotive in cooperation with Apex.AI https://apex.ai/marv-automotive
- Community Edition (free and open source) https://gitlab.com/ternaris/marv-robotics
Documentation: https://ternaris.com/marv-robotics/docs
- Docker
- Git and git-lfs
- rsync
- Repository with tutorial code and this README.org
- Repository with marv-robotics community edition
git clone https://gitlab.com/ApexAI/autowareclass2020.git cd autowareclass2020/lectures/13_MARV_Data_Analytics/ git lfs pull -I scanroot git clone https://gitlab.com/ternaris/marv-robotics.git docker pull ternaris/marv-robotics ./docker/build
Good to go chillin’ in the sun on low bandwith network!
- Docker installation
- Tooling from marv-robotics project
Configure default docker image:
echo ternaris/marv-robotics > marv-robotics/.image-name
Use default example config and start container:
mkdir site1 cp marv-robotics/sites/example/marv.conf site1 ./marv-robotics/scripts/run-container site1 scanroot
db/ <- database, valuable data marv.conf <- config file sessionkey <- delete and users need to relogin store/ <- extracted from bags, less valuable
Run container in background and enter container:
./marv-robotics/scripts/run-container site1 scanroot --detach ./marv-robotics/scripts/enter-container marv user add --password demo demo marv group adduser demo admin marv scan marv run --col bags
Do NOT use the --password option to set a password for a proper user, as it would be eternalized in your shells history; instead without the option, marv user add will prompt for a password.
- Listing
- Summary
- Filters
- Detail view sections
- Tag and comment
Scanner finds files in the scanroot and creates datasets.
Default scanner:
- Find bag files anywhere in scanroot
- Group split bags into datasets
Additional files for each dataset:
- dataset.yaml file
- Kitti category
- Vehicle name
- Driver name
- Link to GitLab issue / purpose of drive
- Kitti object label file: tracklet_labels.xml
./site2/code/marv_tutorials/marv_tutorials/scanner.py
- Ignore directories without dataset.yaml
- Don’t walk into subdirectories
- Return one dataset containing all files in directory
- Declare scanner to be used for bags collection
rsync -vaP site2/ site/ ./marv-robotics/scripts/run-container site scanroot --detach ./marv-robotics/scripts/enter-container marv user add --password demo demo marv scan marv run --col bags
- Detail summary view shows multiple files
./site3/code/marv_tutorials/marv_tutorials/metadata.py
- Filter and listing database is populated from store
- Declare MARV node with Objects output type, saved in store
- Use basic dataset as input
- MARV thinks in streams; dataset is a stream with one message
- Pull dataset message
- Nodes are generators; communicate with MARV by yielding requests
- Identify and open tracklet file
- Count cars
- Publish dict with number of cars
./site3/code/marv_tutorials/marv_tutorials/types.capnp
https://capnproto.org/language.html
capnp id
- Filter config
- Listing config
- Listing summary config
rsync -vaP site3/ site/ MARV_INIT=1 ./marv-robotics/scripts/run-container site scanroot --detach ./marv-robotics/scripts/enter-container marv run --col bags --node objects PDB=1 marv run --col bags --node objects
- Listing column
- Summary field
- Filter for number of cars
./site3/code/marv_tutorials/marv_tutorials/metadata.py
- Metadata output type, saved in store
- dataset.yaml file
- Place a bug into code
- Filter config
- Listing config
marv run --col bags --node metadata PDB=1 marv run --col bags --node metadata
- Listing column
- Filter for vehicle name
- Reimplement extraction of video stream of one topic
- Compose multiple nodes in a map/reduce approach
./site4/code/marv_tutorials/marv_tutorials/imgsrc.py
rosmsg_imgstream node:
- Volatile node, not saved in store
- Select single topic as input stream – use nonexisting for now
- Map raw ROS messages to deserialized ROS messages
- Resulting stream is reusable by multiple nodes
- Get deserialize function
- Will abort if topic does not exist
- Works transparent for ROS1 and ROS2 streams
- Pull input stream; push to output stream
- Break once input stream is exhausted
./site4/code/marv_tutorials/marv_tutorials/imgsrc.py
imgsrc node:
- Volatile node, not saved in store
- rosmsg_imgstream as default input stream
- Map ROS sensor_msgs/Image stream to cv2 image stream
- Processing happens usually on cv2 images
- marv_ros.img_tools has efficient conversion function
- Resulting stream is reusable by multiple nodes
./site4/code/marv_tutorials/marv_tutorials/video.py
video_sink node:
- File, saved in store
- Use marv.make_file to create output file in node
- Call `ffmpeg` in subprocess and push images to stdin
- Publish single message with video file
./site4/code/marv_tutorials/marv_tutorials/video.py
video_section node:
- Detail Section, saved in store
- video_sink as input stream (of one message)
- title parameter
- Publish dictionary creating a section with one video widget
- Nodes saved in store
- Video_section displayed in detail view
rsync -vaP site4/ site/ MARV_INIT=1 ./marv-robotics/scripts/run-container site scanroot --detach ./marv-robotics/scripts/enter-container marv run --col bags --node video_section
- No video section yet
- Fix topic name in
imgsrcand rerun
marv run --col bags --node video_sink --force --force-dependent PDB=1 marv run --col bags --node video_sink --force --force-dependent
- Video player in detail section
./docker/build
./site5/code/marv_tutorials/marv_tutorials/bbox.py
- cv2 images as input stream
- Utility function to detect and visualize bounding boxes
- Use pre-trained model
./site5/code/marv_tutorials/marv_tutorials/video.py
- Change video_sink input
rsync -vaP site5/ site/ MARV_INIT=1 ./marv-robotics/scripts/run-container site scanroot --detach ./marv-robotics/scripts/enter-container marv run --col bags --node video_sink --force --force-dependent
- Re-run video_sink and dependent nodes (video_section)
- Video section now has bounding boxes
- Installation of MARV Community Edition
- Use example config to visualize some ROS1 and ROS2 bags
- Add additional files with custom scanner
- Filter for metadata and display in listing and summary
- Map/reduce image stream from a bag file into a video
- Use tensorflow to detect and mark objects in video
https://ternaris.com/marv-robotics/docs/
https://ternaris.com/marv-robotics/docs/deploy.html
Star and fork us on GitLab:
https://gitlab.com/ternaris/marv-robotics
Give us feedback:
https://gitlab.com/ternaris/marv-robotics/-/issues mailto:team@ternaris.com