-
Notifications
You must be signed in to change notification settings - Fork 154
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
range image to pointcloud with additional fields #426
Comments
Have you considered defining your own custom point similar to what I have prototyped here #290 |
You can pretty much add/remove any fields you like using within the Point Cloud Customization Framework feature. |
Hi @Samahu Thanks for the reply. I think I may have misunderstood the issue you gave me to check or I have not conveyed my question properly. The problem for me is that I am getting the /ouster/points with all fields which is perfect for my case. However, I am creating a new cloud from a range image using metadata provided by the Ouster SDK. but I have minute errors in the values I got from the range image pointcloud and original cloud. I have uploaded two files original_cloud_df is my lidar data and valid_xyzrange_df is my pointcloud data from the range image. The below code is the logic I use for creating segmented pointcloud Can you help me with which steps have an error roi_range_image = np.where(mask_bool,range_image,np.nan) I kept zero values for all points other than my ROI in range image and got a pointcloud and then used indices of point cloud data and filtered the original cloud to get exact points from the original cloud for my ROI. Both values were not equal and my output has changed a bit. Below is the image containing both ROI values left is my Original cloud and Right is my range image cloud. |
I have examined the two attached files and these are not minute errors but large differences check the point on line 800 for example:
In the processed file it is:
These are not minute errors. there is some flow in your script that leads to that which is not clear from what you have shared. How are you obtaining the range image from the driver by the way, is it from |
Hello @Samahu I have subscribed to the ouster/range_image topic and ouster/points topic I have attached a text file. Please check the code and point me to where the problem occurred. I am using ROS Noetic and Python |
The There is another problem contributing to this issue which is, the ouster-ros/src/image_processor.h Line 152 in c5ce565
Luckily for you, I have this problem solved on a branch which you can check it out here #349. I haven't merged it out yet since I need to manage how to display 32-bit RANGE images in RVIZ. Hope this help you solve the issue. |
I'm sorry for not getting back to you sooner. I used your suggestion to take the range image and directly passing to the xyzlut function which gave me a destaggered cloud but in rviz it looks like this and csv file is valid_xyzrange_df.csv May I know why the destaggered range image cloud looks like this in rviz But when I stagger the image and then produce the cloud the pointcloud is good. but as you said the values are bad when compared to the original cloud data I also updated the image_processor.h file in the src folder by downloading the file from the branch you mentioned before and did catkin_make |
I am not sure how you producing the PointCloud, probably a destagger is being performed during this step, which in this case you should provide a staggered range image. Hope this helped! |
I am currently working on segmenting the point cloud. I used reflective images for image segmentation using Yolo and I could map those pixels to the metadata to get XYZ values and publish them as a new pointcloud. Now I want additional fields like reflectivity and range to the created pointcloud data. what kind of solutions do you think will work
1-approach
I have tried filtering range values from my ROI and mapped the range values with values present in the Original scan data which also have range values. I extracted the whole row in the scan data when my range values from the ROI matched the range values in the original cloud data.
The problem was I was getting extra points and my ROI was not accurate.
2- approach.
After creating ROI in range image I used metadata and got a point cloud that accurately matched my ROI in the scene. I am trying to use pandas to match XYZ values from the ROI cloud to the Original scan data to add additional fields to the ROI Cloud. The problem here is The ROI values have 12 digits after decimal and Original has 6 digits after decimal in the XYZ fields. How can I effectively match both XYZ fields and then get additional fields to the ROI cloud.
I still don't know whether this approach is good enough
I am looking for new ideas and alternatives if available
I am using Ouster-OS1 rosbag data, ROS Noetic, Python language, Ubuntu 20.04
The text was updated successfully, but these errors were encountered: