-
Notifications
You must be signed in to change notification settings - Fork 4
Add axis calculation component for pose estimation #149
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
base: release/2.0.0
Are you sure you want to change the base?
Conversation
…lity will be improved
Hi @eleniv3d , @Petingo , (and @9and3 from his powepoint) ! |
@DamienGilliard thanks for the PR, from my side I will have a bit of time to have a look at it the week after the 26th may (if it is not too late and not merged yet). But nice, looks like a chunk for df! |
|
…ements, with 'None' for nonexisting steps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it also with Andrea's roof and there is an error when loading data for a second time coming from
new_xDirection, new_yDirection = df_poses.select_vectors(vectors, rh_previous_xDirection, rh_previous_yDirection)
1. Error running script: list index out of range
i fugured out it's idx 6 that fails. I attach the file here:
|
||
previous_poses = all_poses_in_time.get_last_poses() | ||
all_poses_this_time = [] | ||
for i, cloud in enumerate(i_clouds): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to check that i_clouds is not empty.
so add sth like:
if not i_clouds:
return None, None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, even better I have set i_clouds as not optional in the metadata, so we get "i_cloud parameter failed to collect data" and the code is simply not run. Let me know if you think this is not a satisfactory solution and if I also should implement it in the code :)
…g it causes precommit problems (related to LFS)
…'s comments in PR
This PR concerns the computation of poses for point clouds.

It uses K-Means clustering on the normals of the point cloud to find its orientation. It currently assumes a rectangular-ish beam, potentially poorly covered n^by the poinnt cloud. roundwood is currently not supported
It was observed that from one pose to the other, the axes could flip, which will result in a greater calculated difference of pose than in reality. To remedy that, this PR also includes a "serialization" of the poses in scriptcontext's sticky dictionnary. At the first pose estimation, the dictionnary is created and the poses written in the file. At the next pose estimations, the previous pose of the same element is queried in the dictionnary, and the orientation of the axes of the current pose is adapted so the angle between the axis from one pose to the other is smaller than 45 degrees. In this case we assume that the pose of the elements will not change by more than 45 degrees (for example the elements are not flipped between two poses).
The current solution is not 100% robust, but it seems that the issue is in the K-means clustering of Cilantro, with our data. Fixing it will take some time, so I propose we start with this.
The dictionnary created looks like that:
The z direction being (xDirection X yDirection), it redundant and not serialized
