Open HUmutOzdemir opened 1 year ago
@HUmutOzdemir
There are two things that come to mind:
transformLayer
it "moves" the sofa object somewhere random, hence effectively deleting what was previously reconstructed, and then integrates the new frame (which will of course lack whatever was observed and fused before). I'm not sure if you are actually interested in tracking the sofa, if not, then you could just fine tune the segment size thresholds mentioned in 1 (quick and dirty) or exclude the sofa class from tracking (more involved but nicer solution).
Something else which might be helpful is looking at the real-time visualizer of the reconstructed scene, rather than just generating a mesh once in a while (you have higher chances of catching your sofa flying away if it's being incorrectly tracked :) ). Lastly, you could inspect the actual poses produced by ICP and try to see if they are making any sense or it the sofa tracking indeed is failing miserably.
@margaritaG
@HUmutOzdemir
I am confused by the specifics of what you are currently running. You mention that you disabled the ICP part, but then why are you even injecting any transformations for each object? If you want to correctly disable object tracking - you can just set object_tracking_enabled_
to false (https://github.com/ethz-asl/tsdf-plusplus/blob/main/tsdf_plusplus_ros/src/controller.cc#L274). Have you tried this? Does the sofa get fully reconstructed over time? I would expect so.
If I understand correctly, what you are doing instead is still keeping object tracking on, but then manually injecting some identity poses rather than letting ICP compute their pose. Well if this causes the failures you are seeing, while the previously mentioned proper solution does not, then I have two guesses:
transformLayer
is called, before the next frame is processed and fused.You could also try looking at the individual objects model through the save_objects
service. It will save as meshes the reconstructed individual objects, independently of whether they are active or inactive in the global map. Calling this service in between the different frames coming in (again, manually stepping through the rosbag) can help you double check that the issue is reconstruction itself, and not just inactive vs active voxels.
@margaritaG
Thank you for the answer. Actually, I want to use object tracking functionality. However, I realized that current setup doesn't fuse the previous observations. That's why I created this setup to find the reason of this bug. What I mean by disabling ICP is that commenting out line 408. I also tried to set object_tracking_enabled_
to false. In this case sofa is reconstructed. But I actually need object tracking, and sofa is one of the objects that is able to move.
I checked the poses I gave as input using rviz. I couldn't find a mistake. I also tried to use interactive visualizer, but it always crashed when the robot is crouched. That's why I can not use visualizer.
This could be the reason. Because as you said, for the initial reconstruction, 3 frames are fused. I commented out line 308 in map.cc to check that was the reason. But doing that didn't fix the problem either. I obtaned same reconstructions as before. What is your opinion about this situation? Can I check differently if this is the cause?
I also tried to use save_objects
service. When I called the service, it generates the .ply
files of each object. But when it's time for the last object, the program crashes.
Do you have any idea on why visualizer and save_objects
service crashes?
@HUmutOzdemir
transformLayer
on the sofa object, for a hardcoded pose. I would fuse a bunch of frames, then pause the rosbag (such that no new frames are being fused), and then when you're sure that the last frame has been properly fused, call the new service to transform the sofa object. I would give it some pose that is not identity, but some pose which would lift it somewhere in the sky. It would be helpful if you would be running the visualization of the entire map either through the rviz subscription to the scene mesh or through the interactive visualizer. You should then see how the transformed sofa looks - if suddenly there are missing parts caused just by the transformLayer
call, then it means that your sofa reconstruction was too limited and the transformation through tri-linear interpolation "eats away" some of the reconstructed voxels/surface.When calling save_objects
, you should be careful about when calling it - you should make sure that there's no fusion in progress, and no scene mesh update in progress, else there will be a race condition where you're trying to write to file data that is still being updated. It was a service that I have just implemented for debugging/visualization purposes, hence why it's not guarded against race conditions.
@margaritaG
Thank you for the answer. Actually, I want to use object tracking functionality. However, I realized that current setup doesn't fuse the previous observations. That's why I created this setup to find the reason of this bug. What I mean by disabling ICP is that commenting out line 408. I also tried to set
object_tracking_enabled_
to false. In this case sofa is reconstructed. But I actually need object tracking, and sofa is one of the objects that is able to move.
- I checked the poses I gave as input using rviz. I couldn't find a mistake. I also tried to use interactive visualizer, but it always crashed when the robot is crouched. That's why I can not use visualizer.
- This could be the reason. Because as you said, for the initial reconstruction, 3 frames are fused. I commented out line 308 in map.cc to check that was the reason. But doing that didn't fix the problem either. I obtaned same reconstructions as before. What is your opinion about this situation? Can I check differently if this is the cause?
I also tried to use
save_objects
service. When I called the service, it generates the.ply
files of each object. But when it's time for the last object, the program crashes.Do you have any idea on why visualizer and
save_objects
service crashes?
After the installation is complete, how should I run this project? Do I need to add some code?
Hi, I am trying to use this mapping framework with iTHOR simulator. Currently mapping framework is used with ground truth pose and ground truth pointclouds which are obtained via 3D reprojection of image pixels with ground truth depth information. I run into this issue during my experiments. TSDF++ doesn't fusing previous observations if an object is tracked.
Experiment Setup
/tsdf_plusplus_ros/generate_mesh
ROS servise.Please note that during this experiment, all objects are stationary. Therefore, ICP part in object tracking is commented out. (Line 408-409 in
controller.cc
.Generated Meshes
Whole scene
The following screenshots are the meshes generated after each step of the experiment.
Mesh 1
Mesh 2
As it can be seen, in the second mesh, some parts of the objects is not fused with previous observations, e.g. top part of the first sofa.
Only sofa
In this part, I only published the point cloud of the initial sofa in the environment.
Mesh 1
Mesh 2
Only sofa without object tracking
In this part, I only published the point cloud of the initial sofa in the environment. Additionally, I disabled the object tracking by commenting out the line 425 in
controller.cc
(map_->transformLayer(segment->object_id_, T_O_S);
).Mesh 1
Mesh 2
In this part, second mesh also contains the previous observations. Could you please help me? Thanks in advance.