Skip to content

Commit

Permalink
Expose the parameters through launch files and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Samahu committed Sep 14, 2024
1 parent 126334e commit 71fbced
Show file tree
Hide file tree
Showing 12 changed files with 155 additions and 52 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ Changelog
- RVIZ can't handle image resize
- Can't handle points cloud resize properly (erroneous or corrupt PointCloud)
- Doesn't detect and handle invalid configurations
* updated ouster_client to the release of ``20240425`` [v0.11.1]; changes listed below.
* Added a new parameter ``organized`` to request publishing unorganized point cloud
* Added a new parameter ``destagger`` to request publishing staggered point cloud
* Added two parameters ``min_range``, ``max_range`` to limit the lidar effective range
* Updated ouster_client to the release of ``20240425`` [v0.11.1]; changes listed below.

ouster_client
-------------
Expand Down
8 changes: 8 additions & 0 deletions include/ouster_ros/os_ros.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ inline bool check_token(const std::set<std::string>& tokens,

ouster::util::version parse_version(const std::string& fw_rev);

template <typename T>
uint64_t ulround(T value) {
T rounded_value = std::round(value);
if (rounded_value < 0) return 0ULL;
if (rounded_value > ULLONG_MAX) return ULLONG_MAX;
return static_cast<uint64_t>(rounded_value);
}

} // namespace impl

} // namespace ouster_ros
9 changes: 9 additions & 0 deletions launch/common.launch
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
xyzir
}"/>

<arg name="organized" doc="generate an organzied point cloud"/>
<arg name="destagger" doc="enable or disable point cloud destaggering"/>

<arg name="min_range" doc="minimum lidar range to consider (meters)"/>
<arg name="max_range" doc="maximum lidar range to consider (meters)"/>

<group ns="$(arg ouster_ns)">
<node pkg="nodelet" type="nodelet" name="os_cloud_node"
Expand All @@ -60,6 +65,10 @@
<param name="~/scan_ring" value="$(arg scan_ring)"/>
<param name="~/ptp_utc_tai_offset" type="double" value="$(arg ptp_utc_tai_offset)"/>
<param name="~/point_type" value="$(arg point_type)"/>
<param name="~/organized" value="$(arg organized)"/>
<param name="~/destagger" value="$(arg destagger)"/>
<param name="~/min_range" value="$(arg min_range)"/>
<param name="~/max_range" value="$(arg max_range)"/>
</node>
</group>

Expand Down
23 changes: 14 additions & 9 deletions launch/driver.launch
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@
<arg name="udp_dest" default=" " doc="hostname or IP where the sensor will send data packets"/>
<arg name="lidar_port" default="0" doc="port to which the sensor should send lidar data"/>
<arg name="imu_port" default="0" doc="port to which the sensor should send imu data"/>
<arg name="udp_profile_lidar" default=" " doc="lidar packet profile; possible values: {
<arg name="udp_profile_lidar" default=" "
doc="lidar packet profile; possible values: {
LEGACY,
RNG19_RFL8_SIG16_NIR16,
RNG15_RFL8_NIR8
RNG19_RFL8_SIG16_NIR16_DUAL,
FUSA_RNG15_RFL8_NIR8_DUAL
}"/>
<arg name="lidar_mode" default=" " doc="resolution and rate; possible values: {
<arg name="lidar_mode" default=" "
doc="resolution and rate; possible values: {
512x10,
512x20,
1024x10,
1024x20,
2048x10,
4096x5
}"/>
<arg name="timestamp_mode" default=" " doc="method used to timestamp measurements; possible values: {
<arg name="timestamp_mode" default=" "
doc="method used to timestamp measurements; possible values: {
TIME_FROM_INTERNAL_OSC,
TIME_FROM_SYNC_PULSE_IN,
TIME_FROM_PTP_1588,
Expand Down Expand Up @@ -56,8 +59,8 @@
use this parameter in conjunction with the SCAN flag
and choose a value the range [0, sensor_beams_count)"/>

<arg name="point_type" default="original" doc="point type for the generated point cloud;
available options: {
<arg name="point_type" default="original"
doc="point type for the generated point cloud; available options: {
original,
native,
xyz,
Expand Down Expand Up @@ -87,10 +90,10 @@
<arg name="destagger" default="true"
doc="enable or disable point cloud destaggering"/>

<arg name="min_range" default="0"
doc="minimum lidar range to consider (mm)"/>
<arg name="max_range" default="1000000"
doc="maximum lidar range to consider (mm)"/>
<arg name="min_range" default="0.0"
doc="minimum lidar range to consider (meters)"/>
<arg name="max_range" default="1000.0"
doc="maximum lidar range to consider (meters)"/>

<group ns="$(arg ouster_ns)">
<node pkg="nodelet" type="nodelet" name="os_nodelet_mgr"
Expand Down Expand Up @@ -129,6 +132,8 @@
value="$(arg max_failed_reconnect_attempts)"/>
<param name="~/organized" value="$(arg organized)"/>
<param name="~/destagger" value="$(arg destagger)"/>
<param name="~/min_range" value="$(arg min_range)"/>
<param name="~/max_range" value="$(arg max_range)"/>
</node>
</group>

Expand Down
22 changes: 18 additions & 4 deletions launch/replay.launch
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<arg name="ouster_ns" default="ouster" doc="Override the default namespace of all ouster nodes"/>
<arg name="metadata" default="" doc="path to read metadata file when replaying sensor data"/>
<arg name="bag_file" doc="file name to use for the recorded bag file"/>
<arg name="timestamp_mode" default="TIME_FROM_INTERNAL_OSC" doc="A parameter that allows you to override the timestamp measurements;
possible values: {
<arg name="timestamp_mode" default="TIME_FROM_INTERNAL_OSC"
doc="A parameter that allows you to override the timestamp measurements; possible values: {
TIME_FROM_INTERNAL_OSC,
TIME_FROM_SYNC_PULSE_IN,
TIME_FROM_PTP_1588,
Expand Down Expand Up @@ -50,15 +50,25 @@
use this parameter in conjunction with the SCAN flag
and choose a value the range [0, sensor_beams_count)"/>

<arg name="point_type" default="original" doc="point type for the generated point cloud;
available options: {
<arg name="point_type" default="original"
doc="point type for the generated point cloud; available options: {
original,
native,
xyz,
xyzi,
xyzir
}"/>

<arg name="organized" default="true"
doc="generate an organzied point cloud"/>
<arg name="destagger" default="true"
doc="enable or disable point cloud destaggering"/>

<arg name="min_range" default="0.0"
doc="minimum lidar range to consider (meters)"/>
<arg name="max_range" default="1000.0"
doc="maximum lidar range to consider (meters)"/>

<group ns="$(arg ouster_ns)">
<node pkg="nodelet" type="nodelet" name="os_nodelet_mgr"
output="screen" required="true" args="manager"/>
Expand Down Expand Up @@ -93,6 +103,10 @@
<arg name="proc_mask" value="$(arg proc_mask)"/>
<arg name="scan_ring" value="$(arg scan_ring)"/>
<arg name="point_type" value="$(arg point_type)"/>
<arg name="organized" value="$(arg organized)"/>
<arg name="destagger" value="$(arg destagger)"/>
<arg name="min_range" value="$(arg min_range)"/>
<arg name="max_range" value="$(arg max_range)"/>
</include>

<arg name="_use_bag_file_name" value="$(eval not (bag_file == ''))"/>
Expand Down
22 changes: 18 additions & 4 deletions launch/replay_pcap.launch
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<arg name="ouster_ns" default="ouster" doc="Override the default namespace of all ouster nodes"/>
<arg name="metadata" doc="path to read metadata file when replaying sensor data"/>
<arg name="pcap_file" doc="file name to use for the recorded pcap file"/>
<arg name="timestamp_mode" default="TIME_FROM_INTERNAL_OSC" doc="A parameter that allows you to override the timestamp measurements;
possible values: {
<arg name="timestamp_mode" default="TIME_FROM_INTERNAL_OSC"
doc="A parameter that allows you to override the timestamp measurements; possible values: {
TIME_FROM_INTERNAL_OSC,
TIME_FROM_SYNC_PULSE_IN,
TIME_FROM_PTP_1588,
Expand Down Expand Up @@ -44,15 +44,25 @@
use this parameter in conjunction with the SCAN flag
and choose a value the range [0, sensor_beams_count)"/>

<arg name="point_type" default="original" doc="point type for the generated point cloud;
available options: {
<arg name="point_type" default="original"
doc="point type for the generated point cloud; available options: {
original,
native,
xyz,
xyzi,
xyzir
}"/>

<arg name="organized" default="true"
doc="generate an organzied point cloud"/>
<arg name="destagger" default="true"
doc="enable or disable point cloud destaggering"/>

<arg name="min_range" default="0.0"
doc="minimum lidar range to consider (meters)"/>
<arg name="max_range" default="1000.0"
doc="maximum lidar range to consider (meters)"/>

<group ns="$(arg ouster_ns)">
<node pkg="nodelet" type="nodelet" name="os_nodelet_mgr"
output="screen" required="true" args="manager"/>
Expand Down Expand Up @@ -86,6 +96,10 @@
<arg name="proc_mask" value="$(arg proc_mask)"/>
<arg name="scan_ring" value="$(arg scan_ring)"/>
<arg name="point_type" value="$(arg point_type)"/>
<arg name="organized" value="$(arg organized)"/>
<arg name="destagger" value="$(arg destagger)"/>
<arg name="min_range" value="$(arg min_range)"/>
<arg name="max_range" value="$(arg max_range)"/>
</include>


Expand Down
27 changes: 22 additions & 5 deletions launch/sensor.launch
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@
<arg name="udp_dest" default=" " doc="hostname or IP where the sensor will send data packets"/>
<arg name="lidar_port" default="0" doc="port to which the sensor should send lidar data"/>
<arg name="imu_port" default="0" doc="port to which the sensor should send imu data"/>
<arg name="udp_profile_lidar" default=" " doc="lidar packet profile; possible values: {
<arg name="udp_profile_lidar" default=" "
doc="lidar packet profile; possible values: {
LEGACY,
RNG19_RFL8_SIG16_NIR16,
RNG15_RFL8_NIR8
RNG19_RFL8_SIG16_NIR16_DUAL,
FUSA_RNG15_RFL8_NIR8_DUAL
}"/>
<arg name="lidar_mode" default=" " doc="resolution and rate; possible values: {
<arg name="lidar_mode" default=" "
doc="resolution and rate; possible values: {
512x10,
512x20,
1024x10,
1024x20,
2048x10,
4096x5
}"/>
<arg name="timestamp_mode" default=" " doc="method used to timestamp measurements; possible values: {
<arg name="timestamp_mode" default=" "
doc="method used to timestamp measurements; possible values: {
TIME_FROM_INTERNAL_OSC,
TIME_FROM_SYNC_PULSE_IN,
TIME_FROM_PTP_1588,
Expand Down Expand Up @@ -64,8 +67,8 @@
use this parameter in conjunction with the SCAN flag
and choose a value the range [0, sensor_beams_count)"/>

<arg name="point_type" default="original" doc="point type for the generated point cloud;
available options: {
<arg name="point_type" default="original"
doc="point type for the generated point cloud; available options: {
original,
native,
xyz,
Expand All @@ -90,6 +93,16 @@
doc="maximum number of attempts trying to communicate with the sensor.
Counter resets upon successful connection"/>

<arg name="organized" default="true"
doc="generate an organzied point cloud"/>
<arg name="destagger" default="true"
doc="enable or disable point cloud destaggering"/>

<arg name="min_range" default="0.0"
doc="minimum lidar range to consider (meters)"/>
<arg name="max_range" default="1000.0"
doc="maximum lidar range to consider (meters)"/>

<group ns="$(arg ouster_ns)">
<node pkg="nodelet" type="nodelet" name="os_nodelet_mgr"
output="screen" required="true" args="manager"/>
Expand Down Expand Up @@ -137,6 +150,10 @@
<arg name="proc_mask" value="$(arg proc_mask)"/>
<arg name="scan_ring" value="$(arg scan_ring)"/>
<arg name="point_type" value="$(arg point_type)"/>
<arg name="organized" value="$(arg organized)"/>
<arg name="destagger" value="$(arg destagger)"/>
<arg name="min_range" value="$(arg min_range)"/>
<arg name="max_range" value="$(arg max_range)"/>
</include>

</launch>
48 changes: 39 additions & 9 deletions launch/sensor_mtp.launch
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,25 @@
start client with active configuration of sensor"/>
<arg name="lidar_port" default="0" doc="port to which the sensor should send lidar data"/>
<arg name="imu_port" default="0" doc="port to which the sensor should send imu data"/>
<arg name="udp_profile_lidar" default=" " doc="lidar packet profile; possible values: {
<arg name="udp_profile_lidar" default=" "
doc="lidar packet profile; possible values: {
LEGACY,
RNG19_RFL8_SIG16_NIR16,
RNG15_RFL8_NIR8
RNG19_RFL8_SIG16_NIR16_DUAL,
FUSA_RNG15_RFL8_NIR8_DUAL
}"/>
<arg name="lidar_mode" default=" " doc="resolution and rate; possible values: {
<arg name="lidar_mode" default=" "
doc="resolution and rate; possible values: {
512x10,
512x20,
1024x10,
1024x20,
2048x10,
4096x5
}"/>
<arg name="timestamp_mode" default=" " doc="method used to timestamp measurements; possible values: {
<arg name="timestamp_mode" default=" "
doc="method used to timestamp measurements; possible values: {
TIME_FROM_INTERNAL_OSC,
TIME_FROM_SYNC_PULSE_IN,
TIME_FROM_PTP_1588,
Expand Down Expand Up @@ -68,27 +71,45 @@
use this parameter in conjunction with the SCAN flag
and choose a value the range [0, sensor_beams_count)"/>

<arg name="point_type" default="original" doc="point type for the generated point cloud;
available options: {
<arg name="point_type" default="original"
doc="point type for the generated point cloud; available options: {
original,
native,
xyz,
xyzi,
xyzir
}"/>

<arg name="azimuth_window_start" default="0" doc="azimuth window start,
<arg name="azimuth_window_start" default="0" doc="azimuth window start;
values range [0, 360000] millidegrees"/>
<arg name="azimuth_window_end" default="360000" doc="azimuth window end,
<arg name="azimuth_window_end" default="360000" doc="azimuth window end;
values range [0, 360000] millidegrees"/>

<arg name="persist_config" default="false"
doc="request the sensor to persist settings"/>

<arg name="attempt_reconnect" default="false"
doc="attempting to reconnect to the sensor after connection loss or
sensor powered down"/>
<arg name="dormant_period_between_reconnects" default="1.0"
doc="wait time in seconds between reconnection attempts"/>
<arg name="max_failed_reconnect_attempts" default="2147483647"
doc="maximum number of attempts trying to communicate with the sensor.
Counter resets upon successful connection"/>

<arg name="organized" default="true"
doc="generate an organzied point cloud"/>
<arg name="destagger" default="true"
doc="enable or disable point cloud destaggering"/>

<arg name="min_range" default="0.0"
doc="minimum lidar range to consider (meters)"/>
<arg name="max_range" default="1000.0"
doc="maximum lidar range to consider (meters)"/>

<group ns="$(arg ouster_ns)">
<node pkg="nodelet" type="nodelet" name="os_nodelet_mgr"
output="screen" required="true"
args="manager"/>
output="screen" required="true" args="manager"/>
</group>

<group ns="$(arg ouster_ns)">
Expand All @@ -108,6 +129,11 @@
<param name="~/azimuth_window_start" value="$(arg azimuth_window_start)"/>
<param name="~/azimuth_window_end" value="$(arg azimuth_window_end)"/>
<param name="~/persist_config" value="$(arg persist_config)"/>
<param name="~/attempt_reconnect" value="$(arg attempt_reconnect)"/>
<param name="~/dormant_period_between_reconnects"
value="$(arg dormant_period_between_reconnects)"/>
<param name="~/max_failed_reconnect_attempts"
value="$(arg max_failed_reconnect_attempts)"/>
</node>
</group>

Expand All @@ -130,6 +156,10 @@
<arg name="proc_mask" value="$(arg proc_mask)"/>
<arg name="scan_ring" value="$(arg scan_ring)"/>
<arg name="point_type" value="$(arg point_type)"/>
<arg name="organized" value="$(arg organized)"/>
<arg name="destagger" value="$(arg destagger)"/>
<arg name="min_range" value="$(arg min_range)"/>
<arg name="max_range" value="$(arg max_range)"/>
</include>

</launch>
Loading

0 comments on commit 71fbced

Please sign in to comment.