Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
51 lines (47 loc) · 1.58 KB

File metadata and controls

51 lines (47 loc) · 1.58 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
# Create an image configured with ROS2 including colcon, Nodejs and rclnodejs source
# Supported ARGS:
# ROS_DISTRO = [humble, jazzy, kilted, rolling], default=rolling
# NODE_MAJOR_VER = [20, 22, 24], default=22
# BRANCH = rclnodejs git branch, default=develop
#
# examples:
#
# Build image named 'rclnodejs' and run it with the rclnode test suite
#
# docker build -t rclnodejs .
# docker run -it rclnodejs npm test
#
#
# Build an image for a specific branch of rclnodejs, version of ROS2 and Nodejs use:
#
# docker build -t <image_name> --build-arg ROS_DISTRO=kilted .
# docker build -t <image_name> \
# --build-arg ROS_DISTRO=jazzy \
# --build-arg BRANCH=develop \
# --build-arg NODE_MAJOR_VER=22 .
#
#
# Build and run:
# docker run -it --rm $(docker build -q .)
#
# use
ARG ROS_DISTRO=rolling
FROM ros:${ROS_DISTRO}
# Install dependencies, including Nodejs
ARG NODE_MAJOR_VER=22
RUN apt-get update -y \
&& apt-get install -y curl sudo \
&& curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR_VER}.x | sudo -E bash - \
&& apt-get install -y nodejs
# clone a branch of the rclnodejs repo, build addon libs, generate corresponding JS msgs
ARG BRANCH=develop
WORKDIR /rosdev
SHELL ["/bin/bash", "-c"]
RUN source /opt/ros/${ROS_DISTRO}/setup.bash \
&& apt-get install -y ros-${ROS_DISTRO}-test-msgs \
&& apt-get install -y ros-${ROS_DISTRO}-example-interfaces \
&& git clone -b ${BRANCH} --single-branch https://github.com/RobotWebTools/rclnodejs.git \
&& cd /rosdev/rclnodejs \
&& npm i
WORKDIR /rosdev/rclnodejs
CMD [ "bash" ]
Morty Proxy This is a proxified and sanitized view of the page, visit original site.