Skip to content

Commit 3695a40

Browse files
committed
remove remaining ros2 references
1 parent 24515f3 commit 3695a40

File tree

14 files changed

+95
-168
lines changed

14 files changed

+95
-168
lines changed

.github/workflows/docker-ros.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
platform: amd64,arm64
1313
target: run
1414
base-image: rwthika/ros2:humble
15-
command: ros2 launch mqtt_client standalone.launch.ros2.xml
15+
command: ros2 launch mqtt_client standalone.launch.xml
1616
image-tag: humble
1717
rmw-implementation: rmw_zenoh_cpp
1818

@@ -24,7 +24,7 @@ jobs:
2424
platform: amd64,arm64
2525
target: run
2626
base-image: rwthika/ros2:jazzy
27-
command: ros2 launch mqtt_client standalone.launch.ros2.xml
27+
command: ros2 launch mqtt_client standalone.launch.xml
2828
image-tag: jazzy
2929
enable-push-as-latest: 'true'
3030
rmw-implementation: rmw_zenoh_cpp
@@ -37,7 +37,7 @@ jobs:
3737
platform: amd64,arm64
3838
target: run
3939
base-image: rwthika/ros2:kilted
40-
command: ros2 launch mqtt_client standalone.launch.ros2.xml
40+
command: ros2 launch mqtt_client standalone.launch.xml
4141
image-tag: kilted
4242
rmw-implementation: rmw_zenoh_cpp
4343

@@ -49,6 +49,6 @@ jobs:
4949
platform: amd64,arm64
5050
target: run
5151
base-image: rwthika/ros2:rolling
52-
command: ros2 launch mqtt_client standalone.launch.ros2.xml
52+
command: ros2 launch mqtt_client standalone.launch.xml
5353
image-tag: rolling
5454
rmw-implementation: rmw_zenoh_cpp

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ros2:
1919
variables:
2020
IMAGE_TAG: ros2
2121
BASE_IMAGE: rwthika/ros2:latest
22-
COMMAND: ros2 launch mqtt_client standalone.launch.ros2.xml
22+
COMMAND: ros2 launch mqtt_client standalone.launch.xml
2323
PLATFORM: amd64,arm64
2424
TARGET: dev,run
2525
ENABLE_INDUSTRIAL_CI: 'true'

README.md

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ colcon build --packages-up-to mqtt_client --cmake-args -DCMAKE_BUILD_TYPE=Releas
5252
*mqtt_client* is also available as a Docker image, containerized through [*docker-ros*](https://github.com/ika-rwth-aachen/docker-ros).
5353

5454
```bash
55-
# ROS 2
5655
docker run --rm ghcr.io/ika-rwth-aachen/mqtt_client:latest # or distro-specific tags, e.g., :rolling
5756
```
5857

@@ -79,7 +78,7 @@ For a more advanced setup of your own broker, check out our instructions for run
7978

8079
#### Demo Configuration
8180

82-
The *mqtt_client* is best configured with a ROS parameter *yaml* file. The configuration shown below (also see [`params.yaml`](mqtt_client/config/params.yaml) / [`params.ros2.yaml`](mqtt_client/config/params.ros2.yaml)) allows an exchange of messages as follows:
81+
The *mqtt_client* is best configured with a ROS parameter *yaml* file. The configuration shown below (also see [`params.yaml`](mqtt_client/config/params.yaml) / [`params.yaml`](mqtt_client/config/params.yaml)) allows an exchange of messages as follows:
8382

8483
- ROS messages received locally on ROS topic `/ping/ros` are sent to the broker on MQTT topic `pingpong/ros`;
8584
- MQTT messages received from the broker on MQTT topic `pingpong/ros` are published locally on ROS topic `/pong/ros`;
@@ -110,7 +109,7 @@ bridge:
110109
Launch the *mqtt_client* node with the pre-configured demo parameters:
111110
112111
```bash
113-
ros2 launch mqtt_client standalone.launch.ros2.xml
112+
ros2 launch mqtt_client standalone.launch.xml
114113
```
115114

116115
```txt
@@ -145,9 +144,8 @@ ros2 topic echo /pong/ros
145144
In order to test the communication between *mqtt_client* and other MQTT clients, publish a primitive ROS message on ROS topic `/ping/primitive`, directly publish a primitive MQTT message on MQTT topic `pingpong/primitive` and wait for responses on ROS topic `/pong/primitive`. Note that you need to restart the ROS 2 *mqtt_client* with a different config file.
146145

147146
```bash
148-
# ROS 2
149147
# mqtt_client$
150-
ros2 launch mqtt_client standalone.launch.ros2.xml params_file:=$(ros2 pkg prefix mqtt_client)/share/mqtt_client/config/params.ros2.primitive.yaml
148+
ros2 launch mqtt_client standalone.launch.xml params_file:=$(ros2 pkg prefix mqtt_client)/share/mqtt_client/config/params.primitive.yaml
151149
```
152150

153151
```bash
@@ -172,13 +170,13 @@ If everything works as expected, the second terminal should print a message at 1
172170
You can start the *mqtt_client* node with:
173171

174172
```bash
175-
ros2 launch mqtt_client standalone.launch.ros2.xml
173+
ros2 launch mqtt_client standalone.launch.xml
176174
```
177175

178-
This will automatically load the provided demo [`params.yaml`](mqtt_client/config/params.yaml) / [`params.ros2.yaml`](mqtt_client/config/params.ros2.yaml). If you wish to load your custom configuration file, simply pass `params_file`.
176+
This will automatically load the provided demo [`params.yaml`](mqtt_client/config/params.yaml) / [`params.yaml`](mqtt_client/config/params.yaml). If you wish to load your custom configuration file, simply pass `params_file`.
179177

180178
```bash
181-
ros2 launch mqtt_client standalone.launch.ros2.xml params_file:="</PATH/TO/PARAMS.YAML>"
179+
ros2 launch mqtt_client standalone.launch.xml params_file:="</PATH/TO/PARAMS.YAML>"
182180
```
183181

184182
In order to exploit the benefits of *mqtt_client* being a ROS 2 component, load the component into your own component container.
@@ -227,8 +225,6 @@ client:
227225
228226
#### Bridge Parameters
229227
230-
##### ROS 2
231-
232228
```yaml
233229
bridge:
234230
ros2mqtt: # Object specifying which ROS topics to map to which MQTT topics
@@ -298,27 +294,25 @@ ros2 run rqt_plot rqt_plot /<mqtt_client_name>/latencies/<mqtt2ros/ros_topic>/da
298294

299295
This short package summary documents the package in line with the [ROS Wiki Style Guide](http://wiki.ros.org/StyleGuide).
300296

301-
### ROS 2
302-
303-
#### Components
297+
### Components
304298

305-
##### `mqtt_client/MqttClient`
299+
#### `mqtt_client/MqttClient`
306300

307301
Enables connected ROS-based devices or robots to exchange ROS messages via an MQTT broker using the [MQTT](http://mqtt.org) protocol.
308302

309-
###### Subscribed Topics
303+
##### Subscribed Topics
310304

311305
- `<bridge/ros2mqtt/ros_topic>` ([`rclcpp::SerializedMessage`](https://docs.ros.org/en/ros2_packages/rolling/api/rclcpp/generated/classrclcpp_1_1GenericSubscription.html))
312306
ROS topic whose messages are transformed to MQTT messages and sent to the MQTT broker. May have arbitrary ROS message type.
313307

314-
###### Published Topics
308+
##### Published Topics
315309

316310
- `<bridge/mqtt2ros/ros_topic>` ([`rclcpp::SerializedMessage`](https://docs.ros.org/en/ros2_packages/rolling/api/rclcpp/generated/classrclcpp_1_1GenericPublisher.html))
317311
ROS topic on which MQTT messages received from the MQTT broker are published. May have arbitrary ROS message type.
318312
- `~/latencies/<bridge/mqtt2ros/ros_topic>` ([`std_msgs/Float64`](https://docs.ros.org/en/api/std_msgs/html/msg/Float64.html))
319313
Latencies measured on the message transfer to `<bridge/mqtt2ros/ros_topic>` are published here, if the received messages have a timestamp injected (see [Latency Computation](#latency-computation)).
320314

321-
###### Services
315+
##### Services
322316

323317
- `~/is_connected` ([`mqtt_client/srv/IsConnected`](mqtt_client_interfaces/srv/IsConnected.srv))
324318
Returns whether the client is connected to the MQTT broker.
@@ -329,9 +323,7 @@ Enables connected ROS-based devices or robots to exchange ROS messages via an MQ
329323
- `~/new_mqtt2ros_bridge` ([`mqtt_client/srv/NewMqtt2RosBridge`](mqtt_client_interfaces/srv/NewMqtt2RosBridge.srv))
330324
Returns whether a new MQTT -> ROS bridge was created.
331325

332-
333-
334-
###### Parameters
326+
##### Parameters
335327

336328
See [Configuration](#configuration).
337329

mqtt_client/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ find_package(std_msgs REQUIRED)
1919
find_library(PahoMqttC_LIBRARY libpaho-mqtt3as.so.1 REQUIRED)
2020
find_library(PahoMqttCpp_LIBRARY libpaho-mqttpp3.so.1 REQUIRED)
2121

22-
add_library(${PROJECT_NAME}_lib SHARED src/MqttClient.ros2.cpp)
22+
add_library(${PROJECT_NAME}_lib SHARED src/MqttClient.cpp)
2323

2424
rclcpp_components_register_node(${PROJECT_NAME}_lib
2525
PLUGIN "mqtt_client::MqttClient"

mqtt_client/config/params.aws.yaml

Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,52 @@
1-
# YAML alias for MQTT SSL version.
2-
# The supported values are defined at:
3-
# https://github.com/eclipse/paho.mqtt.cpp/blob/master/src/mqtt/ssl_options.h#L305
4-
tls_1_2: &tls_1_2 3
5-
6-
broker:
7-
# YOU MUST CHANGE THIS ENDPOINT
8-
# Can be found by executing: aws iot describe-endpoint --endpoint-type iot:Data-ATS
9-
host: not-a-real-endpoint-please-use-your-own.us-west-2.amazonaws.com
10-
port: 8883
11-
tls:
12-
enabled: true
13-
# Available at https://www.amazontrust.com/repository/AmazonRootCA1.pem
14-
ca_certificate: path/to/AmazonRootCA1.pem
15-
client:
16-
id: user
17-
# Whether or not to start a clean session with each reconnect.
18-
# If True, the server will forget all subscriptions with each reconnect.
19-
# Set False to request that the server resume an existing session or start
20-
# a new session that may be resumed after a connection loss.
21-
clean_session: false
22-
# The keep alive value, in seconds, to send in CONNECT packet.
23-
keep_alive_interval: 6.0
24-
tls:
25-
# The certificate generated by the AWS IoT Core service
26-
certificate: path/to/a-certificate.pem
27-
# The private key generated by the AWS IoT Core service
28-
key: path/to/a-private-key.pem
29-
# AWS uses TLS v1.2 to encrypt all communication.
30-
version: *tls_1_2
31-
verify: true
32-
# https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_alpn_protos.html
33-
alpn_protos:
34-
# MQTT over AWS IOT requires an ALPN protocol negotiation.
35-
# https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html
36-
- x-amzn-mqtt-ca
37-
buffer:
38-
enabled: true
39-
bridge:
40-
# NOTE: It seems that AWS IOT only supports primitive topics. Using non-primitive
41-
# types results in the error message `Connection to broker lost, will try to reconnect...`
42-
ros2mqtt:
43-
- ros_topic: /ping/primitive
44-
mqtt_topic: pingpong/primitive
45-
primitive: true
46-
mqtt2ros:
47-
- mqtt_topic: pingpong/primitive
48-
ros_topic: /pong/primitive
49-
primitive: true
1+
/**/*:
2+
ros__parameters:
3+
broker:
4+
# YOU MUST CHANGE THIS ENDPOINT
5+
# Can be found by executing: aws iot describe-endpoint --endpoint-type iot:Data-ATS
6+
host: not-a-real-endpoint-please-use-your-own.us-west-2.amazonaws.com
7+
port: 8883
8+
tls:
9+
enabled: true
10+
# Available at https://www.amazontrust.com/repository/AmazonRootCA1.pem
11+
ca_certificate: path/to/AmazonRootCA1.pem
12+
client:
13+
id: user
14+
# Whether or not to start a clean session with each reconnect.
15+
# If True, the server will forget all subscriptions with each reconnect.
16+
# Set False to request that the server resume an existing session or start
17+
# a new session that may be resumed after a connection loss.
18+
clean_session: false
19+
# The keep alive value, in seconds, to send in CONNECT packet.
20+
keep_alive_interval: 6.0
21+
tls:
22+
# The certificate generated by the AWS IoT Core service
23+
certificate: path/to/a-certificate.pem
24+
# The private key generated by the AWS IoT Core service
25+
key: path/to/a-private-key.pem
26+
# AWS uses TLS v1.2 to encrypt all communication.
27+
# The supported values are defined at:
28+
# https://github.com/eclipse/paho.mqtt.cpp/blob/master/src/mqtt/ssl_options.h#L305
29+
version: 3 # TLS v1.2
30+
verify: true
31+
# https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_alpn_protos.html
32+
alpn_protos:
33+
# MQTT over AWS IOT requires an ALPN protocol negotiation.
34+
# https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html
35+
- x-amzn-mqtt-ca
36+
buffer:
37+
enabled: true
38+
bridge:
39+
# NOTE: It seems that AWS IOT only supports primitive topics. Using non-primitive
40+
# types results in the error message `Connection to broker lost, will try to reconnect...`
41+
ros2mqtt:
42+
ros_topics:
43+
- /ping/primitive
44+
/ping/primitive:
45+
mqtt_topic: pingpong/primitive
46+
primitive: true
47+
mqtt2ros:
48+
mqtt_topics:
49+
- pingpong/primitive
50+
pingpong/primitive:
51+
ros_topic: /pong/primitive
52+
primitive: true

mqtt_client/config/params.ros2.aws.yaml

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

mqtt_client/config/params.ros2.yaml

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

0 commit comments

Comments
 (0)