fix rosrust time
This commit is contained in:
parent
91b0ae7ecf
commit
212f7b05cc
|
|
@ -125,7 +125,7 @@ pub(crate) fn check_coord(
|
||||||
match coord {
|
match coord {
|
||||||
Some(y_idx) => {
|
Some(y_idx) => {
|
||||||
let field = &fields[y_idx];
|
let field = &fields[y_idx];
|
||||||
if field.datatype != (*xyz_field_type).into() {
|
if field.datatype != u8::from(*xyz_field_type) {
|
||||||
return Err(ConversionError::InvalidFieldFormat);
|
return Err(ConversionError::InvalidFieldFormat);
|
||||||
}
|
}
|
||||||
Ok(field.clone())
|
Ok(field.clone())
|
||||||
|
|
|
||||||
14
src/lib.rs
14
src/lib.rs
|
|
@ -1,19 +1,19 @@
|
||||||
//! A library to work with the PointCloud2 message type from ROS.
|
//! A library to work with the PointCloud2 message type from ROS.
|
||||||
//!
|
//!
|
||||||
//! ros_pointcloud2 mainly provides iterator-based `Reader` and `Writer` to interact
|
//! ros_pointcloud2 mainly provides iterator-based [`ros_pointcloud2::Reader`] and [`ros_pointcloud2::Writer`] to interact
|
||||||
//! with the internal message type `PointCloud2Msg` without forcing an iteration.
|
//! with the internal message type [`ros_pointcloud2::PointCloud2Msg`] without forcing an iteration.
|
||||||
//!
|
//!
|
||||||
//! For ROS interoperability, the message type generated by the respective crate must be converted to
|
//! For ROS interoperability, the message type generated by the respective crate must be converted to
|
||||||
//! the internal message type `PointCloud2Msg` using the `From` trait,
|
//! the [`ros_pointcloud2::PointCloud2Msg`] using the `From` trait,
|
||||||
//! which is mostly a ownership transfer without copying the point data.
|
//! which is mostly a ownership transfer without copying the point data.
|
||||||
//!
|
//!
|
||||||
//! There are implementations for the `r2r`, `rclrs` (ros2_rust) and `rosrust_msg` message types
|
//! There are implementations for the `r2r`, `rclrs` (ros2_rust) and `rosrust_msg` message types
|
||||||
//! available in the feature flags. If you miss a message type, please open an issue or a PR.
|
//! available in the feature flags. If you miss a message type, please open an issue or a PR.
|
||||||
//! See the `ros_types` module for more information.
|
//! See the [`ros_pointcloud2::ros_types`] module for more information.
|
||||||
//!
|
//!
|
||||||
//! Common point types like `PointXYZ` are provided in the `pcl_utils` module. You can implement any custom point type
|
//! Common point types like `PointXYZ` are provided in the [`ros_pointcloud2::pcl_utils`] module. You can implement any custom point type
|
||||||
//! that can be described by the specification of the `PointCloud2Msg` message type.
|
//! that can be described by the specification.
|
||||||
//! See the `Reader` or `Writer` struct documentation for an example.
|
//! See the [`ros_pointcloud2::Reader`] or [`ros_pointcloud2::Writer`] struct documentation for an example.
|
||||||
//!
|
//!
|
||||||
//! # Example
|
//! # Example
|
||||||
//! ```
|
//! ```
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ impl From<PointCloud2Msg> for rosrust_msg::sensor_msgs::PointCloud2 {
|
||||||
rosrust_msg::sensor_msgs::PointCloud2 {
|
rosrust_msg::sensor_msgs::PointCloud2 {
|
||||||
header: rosrust_msg::std_msgs::Header {
|
header: rosrust_msg::std_msgs::Header {
|
||||||
seq: msg.header.seq,
|
seq: msg.header.seq,
|
||||||
stamp: rosrust_msg::Time {
|
stamp: TimeMsg {
|
||||||
sec: msg.header.stamp.sec,
|
sec: msg.header.stamp.sec,
|
||||||
nsec: msg.header.stamp.nsec,
|
nsec: msg.header.stamp.nsec,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue