forked from wilselby/ouster_example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-docker.sh
executable file
·66 lines (50 loc) · 2.02 KB
/
run-docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
xhost +local:root
IMG=wilselby/ouster_example:latest
# If NVIDIA is present, use Nvidia-docker
if test -c /dev/nvidia0
then
docker run --rm -it \
--runtime=nvidia \
--privileged \
--device /dev/dri:/dev/dri \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
-v "/tmp/.X11-unix:/tmp/.X11-unix:rw" \
$IMG \
bash
else
docker run --rm -it \
-e DISPLAY \
--device=/dev/dri:/dev/dri \
-v "/tmp/.X11-unix:/tmp/.X11-unix" \
$IMG \
bash
fi
# Google Cartographer commands
# Run all commands from the /root/bags directory
# cd /root/bags
# Get sample data
# cd /root/bags
# curl -O https://selbystorage.s3-us-west-2.amazonaws.com/Files/office_demo_9_25_19.bag
# Source the workspace
# source /root/catkin_ws/devel/setup.bash
## Validate rosbag
#rosrun cartographer_ros cartographer_rosbag_validate -bag_filename /root/bags/office_demo_9_25_19.bag
## Run 2D online
#roslaunch cartographer_ros demo_cart_2d.launch bag_filename:=/root/bags/office_demo_9_25_19.bag
## Run 2D offline (to generate .pbstream file)
#roslaunch cartographer_ros offline_cart_2d.launch bag_filenames:=/root/bags/office_demo_9_25_19.bag
## Run 2D assets_writer
#roslaunch cartographer_ros assets_writer_cart_2d.launch bag_filenames:=/root/bags/office_demo_9_25_19.bag pose_graph_filename:=/root/bags/office_demo_9_25_19.bag.pbstream
## View output pngs
#xdg-open office_demo_9_25_19.bag_xray_xy_all.png
#xdg-open office_demo_9_25_19.bag_probability_grid.png
## Run 3d online
#roslaunch cartographer_ros demo_cart_3d.launch bag_filename:=/root/bags/office_demo_9_25_19.bag
## Run 3d offline
#roslaunch cartographer_ros offline_cart_3d.launch bag_filenames:=/root/bags/office_demo_9_25_19.bag
## Run 3d assets_writer
#roslaunch cartographer_ros assets_writer_cart_3d.launch bag_filenames:=/root/bags/office_demo_9_25_19.bag pose_graph_filename:=/root/bags/office_demo_9_25_19.bag.pbstream
#xdg-open office_demo_9_25_19.bag_xray_xy_all.png
#xdg-open office_demo_9_25_19.bag_probability_grid.png