From b8216e973c6be83751ac71e7683772a96cbb0860 Mon Sep 17 00:00:00 2001 From: Ussama Naal Date: Fri, 28 Apr 2023 16:01:38 -0700 Subject: [PATCH] Squashed commit of the following: commit c94a581f799b52d6e54c0c932929d3e6076e3a0f Author: Ussama Naal Date: Fri Apr 28 13:31:55 2023 -0700 - Add a TODO note commit 33b01cbb9a27832814caa784cee74ea91296c72d Author: Ussama Naal Date: Fri Apr 28 13:20:09 2023 -0700 Propagate the parameters to launch files commit 2991897e117ae01971c5f39edabb514785da23cc Author: Ussama Naal Date: Fri Apr 28 12:50:00 2023 -0700 Update ChangeLog and package version commit d58c186a8431da111359197c2e1682d23bbc5390 Author: Ussama Naal Date: Fri Apr 28 12:40:43 2023 -0700 Squashed commit of the following: commit 6280bfa1178bdee4fe695cb4752efd5ff15279db Author: Ussama Naal Date: Fri Apr 28 07:54:34 2023 -0700 Merge branch 'deprecate_tf_prefix' commit 35f2fd2ba50eaf3e4b65909269eb9609bff7a010 Author: Guillaume Doisy Date: Mon Apr 3 18:12:44 2023 +0100 deprecate tf_prefix from os_cloud commit acbe1fe5fbc900e3c44e754e13fdc7eb4b2dfd96 Author: Guillaume Doisy Date: Fri Apr 28 20:27:20 2023 +0100 deprecate tf_prefix from os_cloud (#96) Co-authored-by: Guillaume Doisy commit 175a197182fc0912a4eef48932a4fa7244f3b137 Author: Ussama Naal <606033+Samahu@users.noreply.github.com> Date: Wed Apr 19 12:28:13 2023 -0700 SW-4837: replace the use of ros service to retrieve sensor metadata with latched topics (#102) * Working port of latched metadata topic on ros2 * Update replay and record launch files to providing metadata file an optional parameter * Remove extra white space in replay record command * Undo changes to the metadata-qos-override * minor code syntax improvements * Add missing metadata topic when bag file isn't specified * Use concise syntax and formatting * Reverse logic for easier read * Apply node transition if it exists commit 592e316c6e46ad7e1a353eb93ddf135735a119bf Author: Ussama Naal <606033+Samahu@users.noreply.github.com> Date: Tue Apr 11 18:18:24 2023 -0700 Explicity set cxx compile standard if the env isn't (#99) commit 7a10d2ce17cc14a7412d421590bdc54fdb0671c6 Author: Ussama Naal <606033+Samahu@users.noreply.github.com> Date: Tue Apr 4 15:42:49 2023 -0700 SW-4747: update the ros 2 driver(s) to the 20230403 sdk release (#94) * Update to the latest ouster sdk * Forward multicast funcitonality + Other improvements and fixes * Add service_msgs dependency to package.xml * Correct sensor_mtp.launch for ros2 launch file format * Move to most recent SDK update * Declare and fill defaults for mtp paramters + fix uninitialzed compute_to_scan * Launch file rename and README corrections commit fd76cc9eb0588590094ee012e9312bda276518da Author: Ussama Naal Date: Tue Feb 28 20:07:46 2023 -0800 Remove the duplicate sensor_info object commit 7da1a96577bae52cece1801fc58907b0f3bcf8df Merge: 22acf88 2793304 Author: Ussama Naal <606033+Samahu@users.noreply.github.com> Date: Mon Feb 20 13:39:46 2023 -0800 Merge pull request #51 from ouster-lidar/SW-4342-prototype-ros-2-driver ROS2 driver MVP (beta release) --- CHANGELOG.rst | 2 ++ ouster-ros/config/parameters.yaml | 4 +++- ouster-ros/launch/replay.independent.launch.xml | 14 +++++++++++--- ouster-ros/launch/rviz.launch.py | 2 ++ ouster-ros/launch/rviz.launch.xml | 8 ++++++-- ouster-ros/launch/sensor.composite.launch.xml | 12 ++++++++++-- ouster-ros/launch/sensor.independent.launch.xml | 12 ++++++++++-- ouster-ros/launch/sensor_mtp.launch.xml | 12 ++++++++++-- ouster-ros/package.xml | 2 +- ouster-ros/src/os_cloud_node.cpp | 14 +++++++------- 10 files changed, 62 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 97c5e72c..f0282402 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -25,6 +25,8 @@ ouster_ros(2) * make specifying metadata file optional during record and replay modes as of package version 8.1 * bugfix: activate metadata topic explicitly * bugfix: remove ``--clock`` option when playing bag files in ros-foxy. +* 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/replay.independent.launch.xml b/ouster-ros/launch/replay.independent.launch.xml index 96ad1185..1038a738 100644 --- a/ouster-ros/launch/replay.independent.launch.xml +++ b/ouster-ros/launch/replay.independent.launch.xml @@ -18,7 +18,10 @@ description="whether to run a rviz"/> - + + + + @@ -28,8 +31,10 @@ - - + + + + @@ -47,6 +52,9 @@ + + + diff --git a/ouster-ros/launch/rviz.launch.py b/ouster-ros/launch/rviz.launch.py index 56e0e25e..2d753728 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 995faf5e..82197418 100644 --- a/ouster-ros/launch/rviz.launch.xml +++ b/ouster-ros/launch/rviz.launch.xml @@ -7,6 +7,10 @@ + + + + + args="0 0 0 0 0 0 $(var sensor_frame) $(var imu_frame)"/> + args="0 0 0 0 0 0 $(var sensor_frame) $(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..26772709 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"/> - + + + + @@ -65,7 +68,9 @@ - + + + @@ -83,6 +88,9 @@ + + + diff --git a/ouster-ros/package.xml b/ouster-ros/package.xml index 17e5385c..3c61e6e8 100644 --- a/ouster-ros/package.xml +++ b/ouster-ros/package.xml @@ -2,7 +2,7 @@ ouster_ros - 0.8.3 + 0.8.4 Ouster ROS2 driver ouster developers BSD diff --git a/ouster-ros/src/os_cloud_node.cpp b/ouster-ros/src/os_cloud_node.cpp index 6e4f369b..3b9b34ff 100644 --- a/ouster-ros/src/os_cloud_node.cpp +++ b/ouster-ros/src/os_cloud_node.cpp @@ -105,17 +105,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"; }