Function ouster_ros::lidar_scan_to_laser_scan_msg

Function Documentation

sensor_msgs::msg::LaserScan ouster_ros::lidar_scan_to_laser_scan_msg(const ouster::LidarScan &ls, const rclcpp::Time &timestamp, const std::string &frame, const ouster::sensor::lidar_mode lidar_mode, const uint16_t ring, const std::vector<int> &pixel_shift_by_row, const int return_index)

Convert transformation matrix return by sensor to ROS transform

Parameters:
  • ls[in] lidar scan object

  • timestamp[in] value to set as the timestamp of the generated

  • frame[in] the parent frame of the generated laser scan message

  • lidar_mode[in] lidar mode (width x frequency)

  • ring[in] selected ring to be published

  • pixel_shift_by_row[in] pixel shifts by row

  • return_index[in] index of return desired starting at 0

Returns:

ROS message suitable for publishing as a LaserScan