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

Generalize odometry inspector #971

Closed
miguelriemoliveira opened this issue Jul 13, 2024 · 7 comments
Closed

Generalize odometry inspector #971

miguelriemoliveira opened this issue Jul 13, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@miguelriemoliveira
Copy link
Member

Because of #970 we now seem to have problems in the initial transforms for another sensor.

That means we have to generalize the odometry inspector to run be able to cope with any transformation.

Ultimately we will remove the set initial estimate working from the bagfile, and create a dataset_playbag 2.0 that will allow us to correct annotations and manually set any transformations we'd like.

@miguelriemoliveira
Copy link
Member Author

image

Working with multiple transforms.

3d / 2d mode operational.

Revised the transform tree not to replicate a branch for each collection but rather to have a single branch + the reference collection branch. Much lighter like this.

@miguelriemoliveira
Copy link
Member Author

Now we need to detect if the collection is fixed or dynamic so that when the marker is moved we affect only the selected collection (if the transform is dynamic) or affect all the transformations (if the transform is static).

@Kazadhum you were doing this just yesterday, right?

@Kazadhum
Copy link
Collaborator

Hi @miguelriemoliveira!

Indeed, I wrote a check for if a given TF was fixed! It's not a separate function, but its here:

# Organize the -pll and -cll args into a list of tuples [(parent1,child1), ...]
parent_child_list = [(args["parent_link_list"][i], args["child_link_list"][i]) for i in range(len(args["parent_link_list"]))]
# Check if TF exists and if it is fixed; we do this by comparing the TF from one of the collections to each other
# I think it only makes sense to do this for the sensor dataset
for parent_child_tuple in parent_child_list:
tf_name = parent_child_tuple[0] + '-' + parent_child_tuple[1]
selected_collection_quat = source_dataset["collections"][selected_collection_key]["transforms"][tf_name]["quat"]
selected_collection_trans = source_dataset["collections"][selected_collection_key]["transforms"][tf_name]["trans"]
print("Selected collection quat (" + tf_name + "):")
print(selected_collection_quat)
for collection_key, collection in source_dataset["collections"].items():
if (selected_collection_quat == collection["transforms"][tf_name]["quat"] and selected_collection_trans == collection["transforms"][tf_name]["trans"]):
continue
else:
atomError("Indicated transform " + tf_name + "is not fixed!")

Keep in mind this comes in the context of the copy_tfs_from_dataset.py script, where the child links and corresponding parent links are given as input arguments. (which are then reorganized into (parent, child) tuples for organization).

I can reorganize it into a function quickly if needed!

@miguelriemoliveira
Copy link
Member Author

This is were I have done it before

if args['all_joints_fixed']: # assume the robot is static

@miguelriemoliveira
Copy link
Member Author

I think all is done for now. I have use the dataset['transforms'] that exist in newer datasets.

Perhaps we will need to create a dataset migrate tool ... opened #973 for this.

@miguelriemoliveira
Copy link
Member Author

miguelriemoliveira commented Jul 17, 2024

Missing the creation of a transform_corrector.launch ... should be done in the configure_calibration_package.
Opened #974 for this.

miguelriemoliveira added a commit that referenced this issue Jul 17, 2024
miguelriemoliveira added a commit that referenced this issue Jul 17, 2024
@miguelriemoliveira
Copy link
Member Author

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants