Open lucasw opened 2 months ago
This supports rosrust, needs roslibrust
Trying out adding roslibrust support:
ROS_PACKAGE_PATH=`rospack find geometry_msgs`:`rospack find tf2_msgs`:`rospack find sensor_msgs`:`rospack find std_msgs`:`rospack find actionlib_msgs` cargo build --release --features roslibrust_msg
(not sure why extra ros packages are needed but it wasn't building without them)
Now use this here and try to make a subscriber for PointCloud2 https://github.com/lucasw/ros_pointcloud2/tree/roslibrust
Not including ros_pointcloud2, just trying to receive raw point clouds with roslibrust, it gets a few then does this a few times also:
serde_rosmsg Error: Reached end of memory buffer while reading data
serde_rosmsg Error: Attempted to read beyond the end of decoded value's length
This looks like it could be it, certainly nothing larger than 4096 bytes is getting through: https://github.com/Carter12s/roslibrust/blob/master/roslibrust/src/ros1/subscriber.rs#L120
Was it supposed to read multiple times and build up the whole message? Also haven't I had this working with much larger images- maybe only publishing worked, I didn't try to subscribe?
-> this should be fixed now https://github.com/Carter12s/roslibrust/pull/179
Just continuing on with small size point clouds, and have a ros_pointcloud2 workaround: https://github.com/stelzo/ros_pointcloud2/pull/24#issuecomment-2259537811
Implement the tf lookup and transform of points next.
Could make a point_cloud_to_rerun node (or do that in mcap_to_rerun https://github.com/lucasw/ros_one2z/blob/main/mcap_to_rerun/src/main.rs)
Some transforming is done here https://github.com/lucasw/vimjay/blob/eliminate_build_warnings/src/bin/camera_fov_plane_intersection.rs - the for loop is probably fine (thanks to compile time optimizations) but ideally could make a matrix of all the points in nalgebra and transform them in one step.
Make the transform and PointCloud2 conversion functions available externally.