-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes
47 lines (32 loc) · 978 Bytes
/
notes
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
### cli
docker build --no-cache --build-arg DOCKER_REPO=osrf/ros --build-arg ROS_DISTRO=noetic --build-arg DISTRO_VERSION=-desktop-full -t ros-devcontainer .devcontainer
docker run -it --privileged --network=host --rm \
--env DISPLAY=$DISPLAY \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--name ros-dev1 ros-devcontainer
### use compose
docker-compose up --build
docker-compose exec ros-dev-container /bin/bash
### run ros example
cd ros_ws
catkin_make
source devel/setup.bash
roscore
rosrun node_example node_test
rostopic echo /chatter
### to enable port forwarding (for vnc or web view)
add this to devcontainer.json
"features": {
"ghcr.io/devcontainers/features/desktop-lite:1":{}
},
"forwardPorts": [5901, 8008],
"portsAttributes": {
"5901": {
"label": "VNC"
},
"8008": {
"label": "WEB"
}
}
and delete
"--network=host"