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

Add ability to provide calibration information in the SRDF #703

Merged
merged 3 commits into from
Jan 27, 2022

Conversation

Levi-Armstrong
Copy link
Contributor

@Levi-Armstrong Levi-Armstrong commented Jan 25, 2022

The current calibration config support defining a joint origin in a yaml config file which gets loaded through the srdf. In the environment it will apply these as a ChangeJointOriginCommand.

calibration:
  joints:
    joint_1:
      position:
        x: 1
        y: 2
        z: 3
      orientation:
        x: 0
        y: 0
        z: 0
        w: 1
    joint_2:
      position:
        x: 4
        y: 5
        z: 6
      orientation:
        x: 0
        y: 0
        z: 0
        w: 1

srdf element:

<calibration_config filename="calibration_config.yaml"/>

@codecov
Copy link

codecov bot commented Jan 25, 2022

Codecov Report

Merging #703 (414be93) into master (18da3f1) will decrease coverage by 1.21%.
The diff coverage is 85.86%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #703      +/-   ##
==========================================
- Coverage   92.16%   90.94%   -1.22%     
==========================================
  Files         173      189      +16     
  Lines       11097    12628    +1531     
==========================================
+ Hits        10227    11484    +1257     
- Misses        870     1144     +274     
Impacted Files Coverage Δ
tesseract_srdf/include/tesseract_srdf/srdf_model.h 100.00% <ø> (ø)
tesseract_environment/src/environment.cpp 91.65% <50.00%> (-0.09%) ⬇️
tesseract_srdf/src/configs.cpp 75.51% <75.51%> (ø)
tesseract_common/include/tesseract_common/types.h 100.00% <100.00%> (ø)
...eract_common/include/tesseract_common/yaml_utils.h 93.77% <100.00%> (-4.21%) ⬇️
tesseract_common/src/types.cpp 95.12% <100.00%> (+0.38%) ⬆️
tesseract_srdf/src/srdf_model.cpp 88.29% <100.00%> (ø)
tesseract_common/include/tesseract_common/utils.h 96.29% <0.00%> (-3.71%) ⬇️
...nclude/tesseract_common/allowed_collision_matrix.h 100.00% <0.00%> (ø)
... and 16 more

Copy link
Contributor

@mpowelson mpowelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable. Are you updating the docs too? It looks like you can specify either a file in the urdf or include the information directly in the SRDF? Is there an easy way to load this after the fact if you have to pull it from somewhere?

CalibrationInfo() = default;

/** @brief The joint origin calibration information */
tesseract_common::TransformMap joints;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get more documentation on what this does? Does it replace the existing map or get applied on top of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For every entry it applies a ChangeJointOriginCommand, so it is replacing the origin of the joint with what was provided.

@Levi-Armstrong
Copy link
Contributor Author

Are you updating the docs too?

Yep, see this PR

It looks like you can specify either a file in the urdf or include the information directly in the SRDF?

You can only provide it in the SRDF. The URDF does have a calibration tag but it is currently not supported. I never looked into how this information is used.

Is there an easy way to load this after the fact if you have to pull it from somewhere?

Not exactly. I could create its own command. It currently just loops over the map and applies a ChangeJointOriginCommand for each entry.

@Levi-Armstrong Levi-Armstrong merged commit 98964bc into master Jan 27, 2022
@Levi-Armstrong Levi-Armstrong deleted the feature/CalibrationInfo branch January 27, 2022 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants