Skip to content

Commit 6b301de

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feat/expose-urdf-joint-axis
2 parents 20be5ed + 15fe862 commit 6b301de

File tree

134 files changed

+6969
-34563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+6969
-34563
lines changed

.gitattributes

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Common settings that generally should always be used with your language specific settings
2+
# Sourced from https://github.com/gitattributes/gitattributes/blob/master/Common.gitattributes
3+
4+
# Auto detect text files and perform LF normalization
5+
* text=auto
6+
7+
#
8+
# The above will handle all files NOT found below
9+
#
10+
11+
# Documents
12+
*.bibtex text diff=bibtex
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain
23+
*.md text diff=markdown
24+
*.mdx text diff=markdown
25+
*.tex text diff=tex
26+
*.adoc text
27+
*.textile text
28+
*.mustache text
29+
*.csv text eol=crlf
30+
*.tab text
31+
*.tsv text
32+
*.txt text
33+
*.sql text
34+
*.epub diff=astextplain
35+
36+
# Graphics
37+
*.png binary
38+
*.jpg binary
39+
*.jpeg binary
40+
*.gif binary
41+
*.tif binary
42+
*.tiff binary
43+
*.ico binary
44+
# SVG treated as text by default.
45+
*.svg text
46+
# If you want to treat it as binary,
47+
# use the following line instead.
48+
# *.svg binary
49+
*.eps binary
50+
51+
# Scripts
52+
*.bash text eol=lf
53+
*.fish text eol=lf
54+
*.ksh text eol=lf
55+
*.sh text eol=lf
56+
*.zsh text eol=lf
57+
# These are explicitly windows files and should use crlf
58+
*.bat text eol=crlf
59+
*.cmd text eol=crlf
60+
*.ps1 text eol=crlf
61+
62+
# Serialisation
63+
*.json text
64+
*.toml text
65+
*.xml text
66+
*.yaml text
67+
*.yml text
68+
69+
# Archives
70+
*.7z binary
71+
*.bz binary
72+
*.bz2 binary
73+
*.bzip2 binary
74+
*.gz binary
75+
*.lz binary
76+
*.lzma binary
77+
*.rar binary
78+
*.tar binary
79+
*.taz binary
80+
*.tbz binary
81+
*.tbz2 binary
82+
*.tgz binary
83+
*.tlz binary
84+
*.txz binary
85+
*.xz binary
86+
*.Z binary
87+
*.zip binary
88+
*.zst binary
89+
90+
# Text files where line endings should be preserved
91+
*.patch -text
92+
93+
#
94+
# Exclude files from exporting
95+
#
96+
97+
.gitattributes export-ignore
98+
.gitignore export-ignore
99+
.gitkeep export-ignore

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ updates:
77
ignore:
88
- dependency-name: "*"
99
update-types: ["version-update:semver-patch"]
10+
groups:
11+
eslint-and-eslint-plugins:
12+
patterns:
13+
- "*eslint*"
14+
- "globals"
15+
1016
- package-ecosystem: "github-actions"
1117
directory: "/"
1218
schedule:

.github/workflows/main.yml

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- develop
48

59
defaults:
610
run:
@@ -9,41 +13,31 @@ defaults:
913
jobs:
1014
ci:
1115
name: ${{ matrix.ros_distro }} (node ${{ matrix.node_version }})
12-
if: ${{ github.actor != 'RWT-bot' }}
1316
runs-on: ubuntu-latest
14-
container:
15-
image: ros:${{ matrix.ros_distro }}-ros-core
16-
options: --cap-add=SYS_ADMIN
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
ros_distro: [noetic]
20+
ros_distro:
21+
- noetic
22+
- humble
23+
- jazzy
24+
- kilted
2125
node_version: [20, 22, 24]
2226
env:
2327
ROS_DISTRO: ${{ matrix.ros_distro }}
2428
steps:
25-
- name: Install git in container
26-
run: |
27-
apt-get update
28-
apt-get install -q -y git
29-
- name: Set git safe directory
30-
run: |
31-
git config --global safe.directory '*'
3229
- uses: actions/checkout@v5
33-
env:
34-
TOKEN: "${{ github.event_name == 'push' && endsWith(github.ref, 'develop') && matrix.ros_distro == 'noetic' && secrets.RWT_BOT_PAT || github.token }}"
35-
with:
36-
token: ${{ env.TOKEN }}
30+
3731
- uses: actions/setup-node@v6
3832
with:
3933
cache: npm
4034
node-version: ${{ matrix.node_version }}
41-
- name: Own /github/home and PWD
42-
run: |
43-
chown -hR 1001:121 /github/home .
44-
- name: Install apt dependencies
45-
run: |
46-
apt-get install -q -y libasound2 libnss3 ros-$ROS_DISTRO-rosbridge-server ros-$ROS_DISTRO-tf2-web-republisher ros-$ROS_DISTRO-common-tutorials ros-$ROS_DISTRO-rospy-tutorials ros-$ROS_DISTRO-actionlib-tutorials
47-
- name: Tests
48-
run: |
49-
bash -c "source /opt/ros/$ROS_DISTRO/setup.bash && bash test/build.bash"
35+
36+
- name: Install Node.js dependencies
37+
run: npm ci
38+
39+
- name: Build JavaScript library
40+
run: npm run build
41+
42+
- name: Run tests
43+
run: npm test

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
ARG ROS_DISTRO=noetic
2+
FROM ros:${ROS_DISTRO}-ros-base
3+
4+
# Copy package.xml and install ROS dependencies
5+
COPY package.xml /workspace/
6+
WORKDIR /workspace
7+
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
8+
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
9+
apt-get update && \
10+
rosdep update --include-eol-distros && \
11+
rosdep install --from-paths . --ignore-src -y
12+
13+
# Copy ROS launch files and test setup
14+
COPY test/examples/ /workspace/test/examples/
15+
16+
# Expose rosbridge websocket port
17+
EXPOSE 9090
18+
19+
# Default command runs the ROS backend for testing
20+
CMD ["bash", "-c", "source /opt/ros/$ROS_DISTRO/setup.bash && bash /workspace/test/examples/setup_examples.bash"]

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,28 @@ npm install
5252

5353
Depending on your build environment.
5454

55-
## Build
55+
## Development
5656

57-
Checkout [CONTRIBUTING.md](CONTRIBUTING.md) for details on building.
57+
roslibjs tries to keep the development process simple by storing all relevant tasks as scripts in the package.json file.
58+
Some useful ones are as follows:
59+
60+
### Building
61+
62+
```bash
63+
npm run build
64+
```
65+
66+
### Testing
67+
68+
```bash
69+
npm run test
70+
```
71+
72+
### Linting
73+
74+
```bash
75+
npm run lint
76+
```
5877

5978
## License
6079

eslint.config.js

Lines changed: 0 additions & 69 deletions
This file was deleted.

eslint.config.ts

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import { defineConfig } from "eslint/config";
2+
import eslint from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
import globals from "globals";
5+
import jsdoc from "eslint-plugin-jsdoc";
6+
import prettier from "eslint-plugin-prettier";
7+
8+
export default defineConfig(
9+
eslint.configs.recommended,
10+
{
11+
// Linting rules for TS files, should be combined with the base config when migration is complete
12+
files: ["**/*.{js,jsx,ts,tsx,cjs}"],
13+
extends: [
14+
...tseslint.configs.strictTypeChecked,
15+
...tseslint.configs.stylisticTypeChecked,
16+
],
17+
languageOptions: {
18+
parser: tseslint.parser,
19+
parserOptions: {
20+
projectService: true,
21+
},
22+
},
23+
plugins: {
24+
prettier,
25+
},
26+
rules: {
27+
"prettier/prettier": [2, { endOfLine: "auto" }],
28+
// Disabled to allow namespaced ROS message types since that's how we think about message types in ROS
29+
"@typescript-eslint/no-namespace": 0,
30+
// Plenty of APIs (like mocking APIs in Vitest) require empty functions to be declared.
31+
"@typescript-eslint/no-empty-function": 0,
32+
"prefer-template": 2,
33+
},
34+
},
35+
{
36+
languageOptions: {
37+
globals: {
38+
...globals.es2020,
39+
...globals.browser,
40+
...globals.node,
41+
bson: true,
42+
},
43+
parserOptions: {
44+
ecmaFeatures: {
45+
jsx: true,
46+
},
47+
},
48+
},
49+
},
50+
{
51+
files: ["**/*.{ts,tsx}"],
52+
plugins: {
53+
jsdoc,
54+
},
55+
rules: {
56+
// Redundant in typescript files
57+
"jsdoc/no-types": "error",
58+
},
59+
},
60+
{
61+
ignores: ["dist"],
62+
},
63+
);

examples/math.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
rotation : q2
4242
});
4343
p.applyTransform(tf);
44-
console.log(p);
44+
console.log(tf);
4545
</script>
4646
</head>
4747

0 commit comments

Comments
 (0)