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

transform_point_cloud rust version with roslibrust #7

Open
lucasw opened this issue Jul 30, 2024 · 5 comments
Open

transform_point_cloud rust version with roslibrust #7

lucasw opened this issue Jul 30, 2024 · 5 comments

Comments

@lucasw
Copy link
Owner

lucasw commented Jul 30, 2024

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.

@lucasw
Copy link
Owner Author

lucasw commented Jul 30, 2024

@lucasw
Copy link
Owner Author

lucasw commented Jul 30, 2024

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

@lucasw
Copy link
Owner Author

lucasw commented Jul 30, 2024

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 RosLibRust/roslibrust#179

@lucasw
Copy link
Owner Author

lucasw commented Jul 31, 2024

Just continuing on with small size point clouds, and have a ros_pointcloud2 workaround: stelzo/ros_pointcloud2#24 (comment)

Implement the tf lookup and transform of points next.

@lucasw
Copy link
Owner Author

lucasw commented Jul 31, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant