Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SW-5148: back port improvements in ros 2 to ros 1 #170

Merged
merged 16 commits into from
Jul 25, 2023

Conversation

Samahu
Copy link
Contributor

@Samahu Samahu commented Jul 20, 2023

Related Issues & PRs

Summary of Changes

  • Added the ThreadSafeRingBuffer
    • with minimal unit tests for it
  • Switch to using threads for packet reception and processing instead of timers
  • Added a /ouster/reset service (experimental)
  • Added missing /ouster/get_metadata service to os_replay
  • Ported the refactorings made in ROS2 for imu and lidar packets processors
    • Added PointCloudProcessor
    • Added LaserScanProcessor
    • Added ImageProcessor
    • Users can select which processors to enable through proc_mask flag
  • Changes for the tf transforms
    • Added the ability to switch between dynamic and static broadcast of tf transforms
      • Set default for static transforms breoadcast
    • Added the ability to set custom names for the tf transforms
  • Added a new nodelet name OusterDriver with a new launch file driver.launch
    • The new nodelet combines the functionality of the three nodelets into a single nodelet avoiding the overhead of raw packets on the ROS communication bus.
  • Added a new message LaserScan with ability to set the specific ring through scan_ring argument
  • Added a switch point_cloud_frame to select which frame to be used when publishing point clouds or laser scans
    • choose between sensor_frame or lidar_frame; default is kept to use sensor_frame which would trigger a warning message about raytracing.
  • Renamed nodelets_os namespace to ouster_ros to unify namespace across the code.
    • Subsequently renamed module nodelets_os to ouster_ros_nodelets

Validation

Old Interface Maintained

The three launch commands should be fully preserved under the new changes

# regular launch
roslaunch ouster_ros sensor.launch    \
    sensor_hostname:=<sensor host name>
# record
roslaunch ouster_ros record.launch    \
    sensor_hostname:=<sensor host name>     \
    bag_file:=<optional bag file name>      \
    metadata:=<json file name>              # optional
# replay
roslaunch ouster_ros replay.launch    \
    bag_file:=<path to rosbag file>         \
    metadata:=<json file name>              # optional if bag file has /metadata topic

Single Node (os_sensor+os_cloud+os_image)

To use the new combined node os_driver run the launch file driver.launch.py as shown below but please find the driver_config.yaml and adjust to match your sensor settings:

roslaunch ouster_ros driver.launch

proc_mask flags

  • When running in a single node test enabling \ disabling individual flags for the proc_mask.
    • For example enable only the IMU, SCAN, IMG and PCL.
    • Watch that only the specific message of the enabled message type actually gets published

Alternate PointCloud frame

  • Test altering point_cloud_frame between os_lidar and os_sensor
    • Altering between the two should be clearly reflected in the the rendered point cloud in RVIZ

custom tf frame names

  • Try out renaming the sensor_frame, lidar_frame and imu_frame to something else other the default.
  • Try combining the tf_prefix (available only in ROS1) along with any of the frames mentioned above
  • The updated name should reflected in the transformation tree

switch between dynamic and static transforms broadcast

  • use dynamic_transforms_broadcast and dynamic_transforms_broadcast_rate to switch between static transforms and dynamic updates of transforms.

Invoke the reset service (not implemented)

  • Connect the sensor, then invoke the /ouster/reset service
    rosservice call /ouster/reset
  • A message should printed stating this is not implemented yet.

Samahu added 13 commits June 29, 2023 12:27
Switch to using threads for packet processing in os_sensor node +
Add new wreset service +
Add metadata service to os_replay
Add a switch between dynamic and static broadcast
Only create publisher when processors are enabled
Add a new launch file to utilize os_driver +
Made it is possible to set custom tf frames +
Made it possible to set proc_mask and scan_ring
Rename nodelets_os.xml to ouster_ros_nodelet.xml +
Wrap all classes with ouster_ros +
always default no_bond +
Fix Dockerfile build
formatting
@Samahu Samahu self-assigned this Jul 20, 2023
@Samahu Samahu added the enhancement New feature or request label Jul 20, 2023
@Samahu Samahu marked this pull request as ready for review July 20, 2023 17:14
@Samahu Samahu merged commit ba4470f into master Jul 25, 2023
2 checks passed
@Samahu Samahu deleted the SW-5148-back-port-improvements-in-ros-2-to-ros-1 branch July 25, 2023 01:00
This was referenced Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment