Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit c94a581
Author: Ussama Naal <[email protected]>
Date:   Fri Apr 28 13:31:55 2023 -0700
-    Add a TODO note

commit 33b01cb
Author: Ussama Naal <[email protected]>
Date:   Fri Apr 28 13:20:09 2023 -0700

    Propagate the parameters to launch files

commit 2991897
Author: Ussama Naal <[email protected]>
Date:   Fri Apr 28 12:50:00 2023 -0700

    Update ChangeLog and package version

commit d58c186
Author: Ussama Naal <[email protected]>
Date:   Fri Apr 28 12:40:43 2023 -0700

    Squashed commit of the following:

    commit 6280bfa1178bdee4fe695cb4752efd5ff15279db
    Author: Ussama Naal <[email protected]>
    Date:   Fri Apr 28 07:54:34 2023 -0700

        Merge branch 'deprecate_tf_prefix'

    commit 35f2fd2
    Author: Guillaume Doisy <[email protected]>
    Date:   Mon Apr 3 18:12:44 2023 +0100

        deprecate tf_prefix from os_cloud

commit acbe1fe
Author: Guillaume Doisy <[email protected]>
Date:   Fri Apr 28 20:27:20 2023 +0100

    deprecate tf_prefix from os_cloud (#96)

    Co-authored-by: Guillaume Doisy <[email protected]>

commit 175a197
Author: Ussama Naal <[email protected]>
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 592e316
Author: Ussama Naal <[email protected]>
Date:   Tue Apr 11 18:18:24 2023 -0700

    Explicity set cxx compile standard if the env isn't (#99)

commit 7a10d2c
Author: Ussama Naal <[email protected]>
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 fd76cc9
Author: Ussama Naal <[email protected]>
Date:   Tue Feb 28 20:07:46 2023 -0800

    Remove the duplicate sensor_info object

commit 7da1a96
Merge: 22acf88 2793304
Author: Ussama Naal <[email protected]>
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)
  • Loading branch information
Samahu committed Apr 28, 2023
1 parent 932abd5 commit b8216e9
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 20 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------
Expand Down
4 changes: 3 additions & 1 deletion ouster-ros/config/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''
14 changes: 11 additions & 3 deletions ouster-ros/launch/replay.independent.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
description="whether to run a rviz"/>
<arg name="rviz_config" default="$(find-pkg-share ouster_ros)/config/viz.rviz"
description="optional rviz config file"/>
<arg name="tf_prefix" default="" description="namespace for tf transforms"/>

<arg name="sensor_frame" default="os_sensor" description="value can not be empty"/>
<arg name="lidar_frame" default="os_lidar" description="value can not be empty"/>
<arg name="imu_frame" default="os_imu" description="value can not be empty"/>

<let name="_use_metadata_file" value="$(eval '\'$(var metadata)\' != \'\'')"/>

Expand All @@ -28,8 +31,10 @@
<param name="metadata" value="$(var metadata)"/>
</node>
<node pkg="ouster_ros" exec="os_cloud" name="os_cloud" output="screen">
<param name="tf_prefix" value="$(var tf_prefix)"/>
<param name="timestamp_mode" value="$(var timestamp_mode)"/>
<param name="sensor_frame" value="$(var sensor_frame)"/>
<param name="lidar_frame" value="$(var lidar_frame)"/>
<param name="imu_frame" value="$(var imu_frame)"/>
<param name="timestamp_mode" value="$(var timestamp_mode)"/>
</node>
<node pkg="ouster_ros" exec="os_image" name="os_image" output="screen"/>
</group>
Expand All @@ -47,6 +52,9 @@
<arg name="ouster_ns" value="$(var ouster_ns)"/>
<arg name="rviz_config" value="$(var rviz_config)"/>
<arg name="_enable_static_tf_publishers" value="true"/>
<arg name="sensor_frame" value="$(var sensor_frame)"/>
<arg name="lidar_frame" value="$(var lidar_frame)"/>
<arg name="imu_frame" value="$(var imu_frame)"/>
</include>

<let name="_use_bag_file_name" value="$(eval '\'$(var bag_file)\' != \'b\'')"/>
Expand Down
2 changes: 2 additions & 0 deletions ouster-ros/launch/rviz.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 6 additions & 2 deletions ouster-ros/launch/rviz.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<arg name="_enable_static_tf_publishers" default="false"
description="boolean value to enable static tf publishers"/>

<arg name="sensor_frame" default="os_sensor" description="value can not be empty"/>
<arg name="lidar_frame" default="os_lidar" description="value can not be empty"/>
<arg name="imu_frame" default="os_imu" description="value can not be empty"/>

<group>
<push-ros-namespace namespace="$(var ouster_ns)"/>
<node pkg="rviz2" exec="rviz2" name="rviz2" output="screen"
Expand All @@ -16,10 +20,10 @@
to run rviz2 -->
<node if="$(var _enable_static_tf_publishers)"
pkg="tf2_ros" exec="static_transform_publisher" name="stp_sensor_imu"
args="0 0 0 0 0 0 os_sensor os_imu"/>
args="0 0 0 0 0 0 $(var sensor_frame) $(var imu_frame)"/>
<node if="$(var _enable_static_tf_publishers)"
pkg="tf2_ros" exec="static_transform_publisher" name="stp_sensor_lidar"
args="0 0 0 0 0 0 os_sensor os_lidar"/>
args="0 0 0 0 0 0 $(var sensor_frame) $(var lidar_frame)"/>
</group>

</launch>
12 changes: 10 additions & 2 deletions ouster-ros/launch/sensor.composite.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
description="whether to run a rviz"/>
<arg name="rviz_config" default="$(find-pkg-share ouster_ros)/config/viz.rviz"
description="optional rviz config file"/>
<arg name="tf_prefix" default="" description="namespace for tf transforms"/>

<arg name="sensor_frame" default="os_sensor" description="value can not be empty"/>
<arg name="lidar_frame" default="os_lidar" description="value can not be empty"/>
<arg name="imu_frame" default="os_imu" description="value can not be empty"/>

<group>
<push-ros-namespace namespace="$(var ouster_ns)"/>
Expand All @@ -57,7 +60,9 @@
<param name="metadata" value="$(var metadata)"/>
</composable_node>
<composable_node pkg="ouster_ros" plugin="ouster_ros::OusterCloud" name="os_cloud">
<param name="tf_prefix" value="$(var tf_prefix)"/>
<param name="sensor_frame" value="$(var sensor_frame)"/>
<param name="lidar_frame" value="$(var lidar_frame)"/>
<param name="imu_frame" value="$(var imu_frame)"/>
<param name="timestamp_mode" value="$(var timestamp_mode)"/>
</composable_node>
<composable_node pkg="ouster_ros" plugin="ouster_ros::OusterImage" name="os_image"/>
Expand All @@ -75,6 +80,9 @@
<arg name="ouster_ns" value="$(var ouster_ns)"/>
<arg name="rviz_config" value="$(var rviz_config)"/>
<arg name="_enable_static_tf_publishers" value="true"/>
<arg name="sensor_frame" value="$(var sensor_frame)"/>
<arg name="lidar_frame" value="$(var lidar_frame)"/>
<arg name="imu_frame" value="$(var imu_frame)"/>
</include>

</launch>
12 changes: 10 additions & 2 deletions ouster-ros/launch/sensor.independent.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
description="whether to run a rviz"/>
<arg name="rviz_config" default="$(find-pkg-share ouster_ros)/config/viz.rviz"
description="optional rviz config file"/>
<arg name="tf_prefix" default="" description="namespace for tf transforms"/>

<arg name="sensor_frame" default="os_sensor" description="value can not be empty"/>
<arg name="lidar_frame" default="os_lidar" description="value can not be empty"/>
<arg name="imu_frame" default="os_imu" description="value can not be empty"/>

<group>
<push-ros-namespace namespace="$(var ouster_ns)"/>
Expand All @@ -56,7 +59,9 @@
<param name="metadata" value="$(var metadata)"/>
</node>
<node pkg="ouster_ros" exec="os_cloud" name="os_cloud" output="screen">
<param name="tf_prefix" value="$(var tf_prefix)"/>
<param name="sensor_frame" value="$(var sensor_frame)"/>
<param name="lidar_frame" value="$(var lidar_frame)"/>
<param name="imu_frame" value="$(var imu_frame)"/>
<param name="timestamp_mode" value="$(var timestamp_mode)"/>
</node>
<node pkg="ouster_ros" exec="os_image" name="os_image" output="screen"/>
Expand All @@ -73,6 +78,9 @@
<arg name="ouster_ns" value="$(var ouster_ns)"/>
<arg name="rviz_config" value="$(var rviz_config)"/>
<arg name="_enable_static_tf_publishers" value="true"/>
<arg name="sensor_frame" value="$(var sensor_frame)"/>
<arg name="lidar_frame" value="$(var lidar_frame)"/>
<arg name="imu_frame" value="$(var imu_frame)"/>
</include>

</launch>
12 changes: 10 additions & 2 deletions ouster-ros/launch/sensor_mtp.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@
description="whether to run a rviz"/>
<arg name="rviz_config" default="$(find-pkg-share ouster_ros)/config/viz.rviz"
description="optional rviz config file"/>
<arg name="tf_prefix" default="" description="namespace for tf transforms"/>

<arg name="sensor_frame" default="os_sensor" description="value can not be empty"/>
<arg name="lidar_frame" default="os_lidar" description="value can not be empty"/>
<arg name="imu_frame" default="os_imu" description="value can not be empty"/>

<group>
<push-ros-namespace namespace="$(var ouster_ns)"/>
Expand All @@ -65,7 +68,9 @@
<param name="metadata" value="$(var metadata)"/>
</composable_node>
<composable_node pkg="ouster_ros" plugin="ouster_ros::OusterCloud" name="os_cloud">
<param name="tf_prefix" value="$(var tf_prefix)"/>
<param name="sensor_frame" value="$(var sensor_frame)"/>
<param name="lidar_frame" value="$(var lidar_frame)"/>
<param name="imu_frame" value="$(var imu_frame)"/>
<param name="timestamp_mode" value="$(var timestamp_mode)"/>
</composable_node>
<composable_node pkg="ouster_ros" plugin="ouster_ros::OusterImage" name="os_image"/>
Expand All @@ -83,6 +88,9 @@
<arg name="ouster_ns" value="$(var ouster_ns)"/>
<arg name="rviz_config" value="$(var rviz_config)"/>
<arg name="_enable_static_tf_publishers" value="true"/>
<arg name="sensor_frame" value="$(var sensor_frame)"/>
<arg name="lidar_frame" value="$(var lidar_frame)"/>
<arg name="imu_frame" value="$(var imu_frame)"/>
</include>

</launch>
2 changes: 1 addition & 1 deletion ouster-ros/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ouster_ros</name>
<version>0.8.3</version>
<version>0.8.4</version>
<description>Ouster ROS2 driver</description>
<maintainer email="[email protected]">ouster developers</maintainer>
<license file="LICENSE">BSD</license>
Expand Down
14 changes: 7 additions & 7 deletions ouster-ros/src/os_cloud_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit b8216e9

Please sign in to comment.