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

additional_data leads to configuration error #1005

Closed
Kazadhum opened this issue Jan 22, 2025 · 7 comments
Closed

additional_data leads to configuration error #1005

Kazadhum opened this issue Jan 22, 2025 · 7 comments
Assignees
Labels
discussion Issue for discussing a topic

Comments

@Kazadhum
Copy link
Collaborator

Hi @miguelriemoliveira!

As discussed in #1000, I'm implementing continuous data collection for the additional data, just like I did for the regular sensor data. So, I added the following to my config.yaml for testing:

additional_sensor_data:
  imu:
    modality: "imu"
    link: "imu_link"
    parent_link: "flange"
    child_link: "imu_link"
    throttle: 

As a small aside, I got this structure from these lines of code:

if 'additional_data' in self.config:
for description, value in self.config['additional_data'].items():
data_dict = {'_name': description, 'modality': value['modality'], 'parent': value['link'],
'calibration_parent': value['parent_link'], 'calibration_child': value['child_link']}

Upon trying to configure, this error popped up and the configuration failed:

ATOM Error: Config file does not have the correct keys.
Keys that should not exist: ['additional_sensor_data']
Keys that are missing : []

I traced the origin of this error back to this:

def verifyConfig(config, template_config):
# Check if all high level keys exist
same_keys, extra_keys, missing_keys = dictionaries_have_same_keys(config, template_config)
if not same_keys:
atomError('Config file does not have the correct keys.\nKeys that should not exist: ' +
str(extra_keys) + '\nKeys that are missing : ' + str(missing_keys))

And so, it seems like the template for configuration file does not have the additional_data field.

I opened this issue to discuss whether or not it is worth it to include it again. It should be relatively easy to do, but I ask because maybe it was deleted from the template for a reason, and ultimately would only be useful for when we want to capture data from a sensor the pose of which we do not want to calibrate. However, at least the data collector script seems ready to receive additional_data in the configuration. To maintain backwards compatibility, I would have to add an exception to that error in the verifyConfig() function, like I did for the continuous sub-field.

What do you think I should do?

@miguelriemoliveira
Copy link
Member

Hey @Kazadhum ,

I would say that if we deprecated it then perhaps its better not to include it again.
Moreover, you don't actually need it do you?

@miguelriemoliveira
Copy link
Member

I would propose that you do a new field called something like continuous data or something,

How do you propose to store the (continuous) imu messages?

@Kazadhum
Copy link
Collaborator Author

Yes, I don't need it, so I think I agree with you that it's not worth including again.

I would propose that you do a new field called something like continuous data or something,
How do you propose to store the (continuous) imu messages?

This is exactly what I have implemented at the moment.
Here is a print from a dataset

Image

So I have a top-level continuous_sensor_data field, with a sub-field for each sensor.

@Kazadhum Kazadhum mentioned this issue Jan 22, 2025
5 tasks
Kazadhum added a commit that referenced this issue Jan 22, 2025
Removed the commented additional_data field that was added for testing
after deciding to not implement it.
@miguelriemoliveira
Copy link
Member

Sounds good. But the imu should be the sensor name and as such should be an instance like name, e.g. arm imu or imu 1.
The term "imu" alone is the modality,

One other thing. How will you have the collection stamp? From the data in the collections, i.e., transforms, or sensor data ...

@Kazadhum
Copy link
Collaborator Author

Kazadhum commented Jan 23, 2025

Sounds good. But the imu should be the sensor name and as such should be an instance like name, e.g. arm imu or imu 1. The term "imu" alone is the modality,

You're right, changing this in the configuration...

One other thing. How will you have the collection stamp? From the data in the collections, i.e., transforms, or sensor data ...

Currently, it looks like this:

Image

I believe this is the same organization as in the collections for other sensors, with the sensor data at the same level as the header.

Kazadhum added a commit that referenced this issue Jan 23, 2025
Renamed 'imu' sensor to 'imu_hand', to be more explicit.
@miguelriemoliveira
Copy link
Member

Yes, that's it. Thanks.

@Kazadhum
Copy link
Collaborator Author

Thank you! Closing this issue now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Issue for discussing a topic
Development

No branches or pull requests

2 participants