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

Declare joint limit parameters #408

Merged
merged 7 commits into from
Apr 11, 2021
Merged

Conversation

bostoncleek
Copy link
Contributor

Joint position, velocity, and accleration parameter limits
where not declared in the robot_model_loader. This prevented
the use of joint limits.

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

Copy link
Member

@AndyZe AndyZe left a comment

Choose a reason for hiding this comment

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

Generally looks good! I'm not very familiar with ROS2 so somebody else should def review this.

Copy link
Contributor

@destogl destogl left a comment

Choose a reason for hiding this comment

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

This looks good. Just a small comment to check.

Also adding some tests would be nice.

Joint position, velocity, and accleration parameter limits
where not declared in the `robot_model_loader`. This prevented
the use of joint limits.
@codecov
Copy link

codecov bot commented Apr 5, 2021

Codecov Report

Merging #408 (20070bb) into main (855db9e) will decrease coverage by 0.07%.
The diff coverage is 45.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #408      +/-   ##
==========================================
- Coverage   53.04%   52.97%   -0.06%     
==========================================
  Files         212      212              
  Lines       22612    22622      +10     
==========================================
- Hits        11992    11982      -10     
- Misses      10620    10640      +20     
Impacted Files Coverage Δ
...bot_model/include/moveit/robot_model/robot_model.h 92.86% <ø> (ø)
...bot_state/include/moveit/robot_state/robot_state.h 88.89% <ø> (ø)
moveit_ros/moveit_servo/src/servo_calcs.cpp 61.64% <0.00%> (-1.00%) ⬇️
...ning/robot_model_loader/src/robot_model_loader.cpp 69.60% <51.22%> (-4.08%) ⬇️
moveit_core/robot_model/src/joint_model.cpp 47.28% <0.00%> (-3.63%) ⬇️
...meterization/work_space/pose_model_state_space.cpp 81.14% <0.00%> (-1.25%) ⬇️
...anning_scene_monitor/src/current_state_monitor.cpp 55.90% <0.00%> (-0.43%) ⬇️
...cessing/src/time_optimal_trajectory_generation.cpp 90.28% <0.00%> (-0.39%) ⬇️
...e/collision_detection_fcl/src/collision_common.cpp 75.19% <0.00%> (+0.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6836d76...20070bb. Read the comment docs.

Copy link
Member

@JafarAbdi JafarAbdi left a comment

Choose a reason for hiding this comment

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

LGTM

But I'm not sure if we should explicitly specify the default values (0.0 & false) when declaring the parameters,

Currently, if the user didn't load the joint limit parameters and in another function, they called get_parameter for one of the joint limit parameters they will get 0.0/false rather than PARAMETER_NOT_SET which may not be expected

@AndyZe @destogl @henningkayser what do you think .?

@AndyZe
Copy link
Member

AndyZe commented Apr 5, 2021

Currently, if the user didn't load the joint limit parameters and in another function, they called get_parameter for one of the joint limit parameters they will get 0.0/false rather than PARAMETER_NOT_SET which may not be expected

I would rather not set defaults

@bostoncleek
Copy link
Contributor Author

Currently, if the user didn't load the joint limit parameters and in another function, they called get_parameter for one of the joint limit parameters they will get 0.0/false rather than PARAMETER_NOT_SET which may not be expected

I would rather not set defaults

That is a good point. Will update to remove the default parameters.

Removed defualt values for joint limits and print error message
if a limit is indicated but not limit is specified.
Copy link
Member

@tylerjw tylerjw left a comment

Choose a reason for hiding this comment

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

lgtm, would it be difficult to add a test of this? Just have a test that sets the parameters using the c++ ros parameter interface or via loading a yaml and checks that those are parsed correctly by this code?

@bostoncleek
Copy link
Contributor Author

bostoncleek commented Apr 7, 2021

lgtm, would it be difficult to add a test of this? Just have a test that sets the parameters using the c++ ros parameter interface or via loading a yaml and checks that those are parsed correctly by this code?

Writing a useful test for this is somewhat difficult. The robot loader does not have a method to easily retrieve the joint limits. If I use a node to set them and get them then I am really only testing whether or not the loader will throw and exception.

@AndyZe
Copy link
Member

AndyZe commented Apr 11, 2021

3x +1's --> let's get this merged and make an issue to write a test

@AndyZe AndyZe merged commit f2bb696 into moveit:main Apr 11, 2021
MikeWrock pushed a commit to MikeWrock/moveit2 that referenced this pull request Aug 15, 2022
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.

5 participants