Skip to content

Commit 608e987

Browse files
authored
Integrate latest mobile_to_maritime API (#316)
* Added message transforms * Fixed launch file * cleanup launch file
1 parent 49a0fa2 commit 608e987

File tree

4 files changed

+27
-14
lines changed

4 files changed

+27
-14
lines changed

blue_demos/teleoperation/config/joy_teleop.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ joy_teleop:
88
manual_control:
99
type: topic
1010
interface_type: geometry_msgs/msg/Twist
11-
topic_name: cmd_vel
11+
topic_name: /cmd_vel
1212
deadman_axes: [2]
1313
axis_mappings:
1414
linear-x:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
message_transforms:
2+
ros__parameters:
3+
4+
incoming_topics:
5+
- /cmd_vel
6+
7+
transforms:
8+
/cmd_vel:
9+
outgoing_topic: /integral_sliding_mode_controller/reference
10+
message_type: geometry_msgs/msg/Twist

blue_demos/teleoperation/launch/joy_teleop.launch.yaml

+7-11
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ launch:
55
default: $(find-pkg-share blue_demos)/teleoperation/config/joy_teleop.yaml
66

77
- arg:
8-
name: use_maritime
9-
default: "true"
8+
name: transforms_file
9+
default: $(find-pkg-share blue_demos)/teleoperation/config/transforms.yaml
1010

1111
- node:
1212
pkg: joy_linux
@@ -22,12 +22,8 @@ launch:
2222
param:
2323
- from: $(var joy_file)
2424

25-
- node:
26-
pkg: mobile_to_maritime
27-
exec: mobile_twist_to_maritime_twist
28-
param:
29-
- name: in_topic
30-
value: cmd_vel
31-
- name: out_topic
32-
value: /integral_sliding_mode_controller/reference
33-
if: $(var use_maritime)
25+
- include:
26+
file: $(find-pkg-share message_transforms)/launch/message_transforms.launch.py
27+
arg:
28+
- name: parameters_file
29+
value: $(var transforms_file)

docs/docs/tutorials/teleop.mdx

+9-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,17 @@ Docker as described in the [installation instructions](/installation).
5151
[REP-105](https://ros.org/reps/rep-0105.html); however, the launched ISMC
5252
adheres to the maritime conventions recorded in [REP-156](https://github.com/ros-infrastructure/rep/pull/398).
5353
To convert the velocity commands to the appropriate convention, run the
54-
following `mobile_to_maritime` message filter in a new terminal:
54+
`message_transforms` node in a new terminal:
5555

5656
```bash
57-
ros2 run mobile_to_maritime mobile_twist_to_maritime_twist --ros-args -p in_topic:=/cmd_vel -p out_topic:=/integral_sliding_mode_controller/reference
57+
ros2 launch message_transforms message_transforms.launch.py parameters_file:=<path/to/transforms.yaml>
58+
```
59+
60+
where `<path/to/transforms.yaml>` should be replaced with the path to the
61+
`transforms.yaml` file in the `blue_demos` package, e.g.,
62+
63+
```bash
64+
ros2 launch message_transforms message_transforms.launch.py parameters_file:=./blue_demos/teleoperation/config/transforms.yaml
5865
```
5966

6067
5. You should now be able to teleoperate the BlueROV2 using your keyboard.

0 commit comments

Comments
 (0)