diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index b2e2fafb..f6964420 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -22,6 +22,8 @@ ouster_ros(2)
* added a new ``/ouster/metadata`` topic that is consumed by os_cloud and os_image nodes and save it
to the bag file on record
* make specifying metadata file optional during record and replay modes as of package version 8.1
+* replace ``tf_prefix`` from ``os_cloud`` with ``sensor_frame``, ``lidar_frame`` and ``imu_frame``
+ launch parameters.
ouster_client
-------------
diff --git a/ouster-ros/config/parameters.yaml b/ouster-ros/config/parameters.yaml
index 44189e15..7789016d 100644
--- a/ouster-ros/config/parameters.yaml
+++ b/ouster-ros/config/parameters.yaml
@@ -12,5 +12,7 @@ ouster/os_sensor:
imu_port: 0
ouster/os_cloud:
ros__parameters:
- tf_prefix: ''
+ sensor_frame: 'os_sensor'
+ lidar_frame: 'os_lidar'
+ imu_frame: 'os_imu'
timestamp_mode: ''
diff --git a/ouster-ros/launch/record.composite.launch.xml b/ouster-ros/launch/record.composite.launch.xml
index d219d093..a27d47f1 100644
--- a/ouster-ros/launch/record.composite.launch.xml
+++ b/ouster-ros/launch/record.composite.launch.xml
@@ -41,7 +41,10 @@
description="whether to run a rviz"/>
-
+
+
+
+
@@ -59,7 +62,9 @@
-
+
+
+
@@ -77,6 +82,9 @@
+
+
+
diff --git a/ouster-ros/launch/replay.composite.launch.xml b/ouster-ros/launch/replay.composite.launch.xml
index 2941ba30..5789b620 100644
--- a/ouster-ros/launch/replay.composite.launch.xml
+++ b/ouster-ros/launch/replay.composite.launch.xml
@@ -18,7 +18,10 @@
description="whether to run a rviz"/>
-
+
+
+
+
@@ -29,7 +32,9 @@
-
+
+
+
@@ -49,6 +54,9 @@
+
+
+
diff --git a/ouster-ros/launch/rviz.launch.py b/ouster-ros/launch/rviz.launch.py
index 0642ea40..0cb08eec 100644
--- a/ouster-ros/launch/rviz.launch.py
+++ b/ouster-ros/launch/rviz.launch.py
@@ -31,6 +31,8 @@ def generate_launch_description():
# NOTE: the two static tf publishers are rather a workaround to let rviz2
# get going and not complain while waiting for the actual sensor frames
# to be published that is when running rviz2 using a parent launch file
+ # TODO: need to be able to propagate the modified frame names from the
+ # parameters file to RVIZ launch py.
sensor_imu_tf = Node(
package="tf2_ros",
executable="static_transform_publisher",
diff --git a/ouster-ros/launch/rviz.launch.xml b/ouster-ros/launch/rviz.launch.xml
index 0b80ada1..b8ce09ce 100644
--- a/ouster-ros/launch/rviz.launch.xml
+++ b/ouster-ros/launch/rviz.launch.xml
@@ -7,6 +7,10 @@
+
+
+
+
+ args="--frame-id $(var sensor_frame) --child-frame-id $(var imu_frame)"/>
+ args="--frame-id $(var sensor_frame) --child-frame-id $(var lidar_frame)"/>
\ No newline at end of file
diff --git a/ouster-ros/launch/sensor.composite.launch.xml b/ouster-ros/launch/sensor.composite.launch.xml
index cd2965c1..208f7082 100644
--- a/ouster-ros/launch/sensor.composite.launch.xml
+++ b/ouster-ros/launch/sensor.composite.launch.xml
@@ -39,7 +39,10 @@
description="whether to run a rviz"/>
-
+
+
+
+
@@ -57,7 +60,9 @@
-
+
+
+
@@ -75,6 +80,9 @@
+
+
+
diff --git a/ouster-ros/launch/sensor.independent.launch.xml b/ouster-ros/launch/sensor.independent.launch.xml
index a40c09f7..62a1f110 100644
--- a/ouster-ros/launch/sensor.independent.launch.xml
+++ b/ouster-ros/launch/sensor.independent.launch.xml
@@ -39,7 +39,10 @@
description="whether to run a rviz"/>
-
+
+
+
+
@@ -56,7 +59,9 @@
-
+
+
+
@@ -73,6 +78,9 @@
+
+
+
diff --git a/ouster-ros/launch/sensor_mtp.launch.xml b/ouster-ros/launch/sensor_mtp.launch.xml
index 7fe115f7..5d7885c4 100644
--- a/ouster-ros/launch/sensor_mtp.launch.xml
+++ b/ouster-ros/launch/sensor_mtp.launch.xml
@@ -47,7 +47,10 @@
description="whether to run a rviz"/>
-
+
+
+
+
@@ -83,6 +86,9 @@
+
+
+
diff --git a/ouster-ros/package.xml b/ouster-ros/package.xml
index e6855890..1ffd719f 100644
--- a/ouster-ros/package.xml
+++ b/ouster-ros/package.xml
@@ -2,7 +2,7 @@
ouster_ros
- 0.8.1
+ 0.8.2
Ouster ROS2 driver
ouster developers
BSD
@@ -20,7 +20,6 @@
pcl_ros
pcl_conversions
std_srvs
- service_msgs
ouster_msgs
ouster_srvs
diff --git a/ouster-ros/src/os_cloud_node.cpp b/ouster-ros/src/os_cloud_node.cpp
index 061fe41c..cd37096f 100644
--- a/ouster-ros/src/os_cloud_node.cpp
+++ b/ouster-ros/src/os_cloud_node.cpp
@@ -91,17 +91,17 @@ class OusterCloud : public OusterProcessingNodeBase {
}
void declare_parameters() {
- declare_parameter("tf_prefix");
+ declare_parameter("sensor_frame");
+ declare_parameter("lidar_frame");
+ declare_parameter("imu_frame");
declare_parameter("timestamp_mode");
}
void parse_parameters() {
- auto tf_prefix = get_parameter("tf_prefix").as_string();
- if (is_arg_set(tf_prefix) && tf_prefix.back() != '/')
- tf_prefix.append("/");
- sensor_frame = tf_prefix + "os_sensor";
- imu_frame = tf_prefix + "os_imu";
- lidar_frame = tf_prefix + "os_lidar";
+ sensor_frame = get_parameter("sensor_frame").as_string();
+ lidar_frame = get_parameter("lidar_frame").as_string();
+ imu_frame = get_parameter("imu_frame").as_string();
+
auto timestamp_mode_arg = get_parameter("timestamp_mode").as_string();
use_ros_time = timestamp_mode_arg == "TIME_FROM_ROS_TIME";
}