Skip to content

Commit 611fa8f

Browse files
committed
Initial commit
0 parents  commit 611fa8f

File tree

5 files changed

+144
-0
lines changed

5 files changed

+144
-0
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
.vscode
3+
.vscode/**
4+
.vscode-test/**
5+
.gitignore
6+
vsc-extension-quickstart.md
7+
.vscodeignore
8+
*.vsix

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Change Log
2+
3+
## [Unreleased]
4+
5+
## [1.0.0]
6+
- Initial release

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ROS Snippets
2+
3+
A collection of ROS (Robot operating system) snippets for an `xml` launch files.
4+
5+
## Features
6+
7+
Snippets list:
8+
9+
* `remap` - Declare a name remapping,
10+
* `param` - Set a parameter on the parameter server,
11+
* `rosparam` - Set ROS parameters for the launch,
12+
* `rosparam file` - Set ROS parameters for the launch with rosparam file,
13+
* `node compact wrapped` - Minimal node tag in one line,
14+
* `node compact` - Minimal node tag with body,
15+
* `node complex wrapped` - Node tag in one line with more parameters,
16+
* `node complex` - Node tag with body and more parameters,
17+
* `arg` - Declare an argument,
18+
* `launch` - Root element of every launchfile,
19+
* `include` - Include another launchfile,
20+
* `tf` - Static transform publisher node,
21+
* `group` - Group with namespace.

package.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "ros-snippets",
3+
"displayName": "ROS snippets",
4+
"description": "ROS (Robot operating system) snippets for launchfiles.",
5+
"version": "0.1.0",
6+
"publisher": "pijar",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/pijaro/ros-snippets.git"
10+
},
11+
"engines": {
12+
"vscode": "^1.21.0"
13+
},
14+
"categories": [
15+
"Snippets"
16+
],
17+
"contributes": {
18+
"snippets": [
19+
{
20+
"language": "xml",
21+
"path": "./snippets/snippets.json"
22+
}
23+
]
24+
}
25+
}

snippets/snippets.json

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"remap": {
3+
"scope": "xml",
4+
"prefix": "remap",
5+
"body": "<remap from=\"${1}\" to=\"${2}\"/>${0}",
6+
"description": "ROS Remap topic"
7+
},
8+
"param": {
9+
"scope": "xml",
10+
"prefix": "param",
11+
"body": "<param name=\"${1}\" value=\"${2}\"/>${0}",
12+
"description": "ROS Param"
13+
},
14+
"rosparam file": {
15+
"scope": "xml",
16+
"prefix": "rosparam",
17+
"body": "<rxosparam file=\"$(find ${1:ros_package})/config/${2:config}.yaml\" command=\"load\" ns=\"${3}\" />",
18+
"description": "ROS Rosparam from file"
19+
},
20+
"rosparam": {
21+
"scope": "xml",
22+
"prefix": "rosparam",
23+
"body": "<rosparam param=\"${1}\">${2}</rosparam>",
24+
"description": "ROS Rosparam"
25+
},
26+
"node compact": {
27+
"scope": "xml",
28+
"prefix": "node",
29+
"body": ["<node pkg=\"${1}\" type=\"${2}\" name=\"${2}\">",
30+
"\t${0}",
31+
"</node>"],
32+
"description": "ROS node compact"
33+
},
34+
"node compact wrapped": {
35+
"scope": "xml",
36+
"prefix": "node",
37+
"body": "<node pkg=\"${1}\" type=\"${2}\" name=\"${2}\" />",
38+
"description": "ROS node compact in one line"
39+
},
40+
"node complex wrapped": {
41+
"scope": "xml",
42+
"prefix": "node",
43+
"body": "<node pkg=\"${1}\" type=\"${2}\" name=\"${2}\" output=\"${3:screen}\" respawn=\"${4:false}\" respawn_delay=\"${5:0}\" />",
44+
"description": "ROS node with complex settings in single line"
45+
},
46+
"node complex": {
47+
"scope": "xml",
48+
"prefix": "node",
49+
"body": ["<node pkg=\"${1}\" type=\"${2}\" name=\"${2}\" output=\"${3:screen}\" respawn=\"${4:false}\" respawn_delay=\"${5:0}\">",
50+
"\t${0}",
51+
"</node>"],
52+
"description": "ROS node with complex settings"
53+
},
54+
"arg": {
55+
"scope": "xml",
56+
"prefix": "arg",
57+
"body": "<arg name=\"${1}\" default=\"${2}\"/>",
58+
"description": "ROS arg"
59+
},
60+
"launch": {
61+
"scope": "xml",
62+
"prefix": "launch",
63+
"body": ["<?xml version=\"1.0\"?>", "<launch>", "\t${0}", "</launch>"],
64+
"description": "ROS launch template"
65+
},
66+
"include": {
67+
"scope": "xml",
68+
"prefix": "include",
69+
"body": "<include file=\"$(find ${1:ros_package})/launch/${2:file}.launch\" />",
70+
"description": "ROS include file"
71+
},
72+
"static tf": {
73+
"scope": "xml",
74+
"prefix": "tf",
75+
"body": "<node pkg=\"tf\" type=\"static_transform_publisher\" name=\"${1:parent}_to_${2:child}_static_tf\" args=\"0 0 0 0 0 0 ${1:parent} ${2:child} ${3:100}\" />",
76+
"description": "ROS static tf publisher"
77+
},
78+
"group": {
79+
"scope": "xml",
80+
"prefix": "group",
81+
"body": ["<group ns=\"${1}\">","\t${0}","</group>"],
82+
"description": "ROS group"
83+
}
84+
}

0 commit comments

Comments
 (0)