-
Notifications
You must be signed in to change notification settings - Fork 134
Extend parsing of acceleration, deceleration and jerk limits from limit
tag
#212
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: master
Are you sure you want to change the base?
Conversation
This pull request has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/allow-for-more-complex-joints-in-urdf/42234/3 |
This pull request has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/proposal-to-extend-jointlimits-in-urdf/42831/1 |
urdf_parser/src/joint.cpp
Outdated
const char* deceleration_str = config->Attribute("deceleration"); | ||
if (deceleration_str == NULL){ | ||
CONSOLE_BRIDGE_logDebug("urdfdom.joint_limit: no deceleration, using default value"); | ||
jl.deceleration = std::numeric_limits<double>::infinity(); |
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.
This is not a full review, but an isolated comment. If the deceleration is unspecified, wouldn't it make more sense to default to the acceleration value?
Unrelated nit: Bracing and spacing style is inconsistent in this changeset.
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. That's a very good point. I'll do the changes soon
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.
Done!
…it tag Signed-off-by: Sai Kishor Kothakota <[email protected]>
Signed-off-by: Sai Kishor Kothakota <[email protected]>
Signed-off-by: Sai Kishor Kothakota <[email protected]>
998b548
to
22d0e79
Compare
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.
Is someone working on enforcing these in ros2_control
? Otherwise these new limits will just confuse folks.
(@bmagyar)
@@ -156,12 +161,80 @@ bool parseJointLimits(JointLimits &jl, tinyxml2::XMLElement* config) | |||
{ | |||
try { | |||
jl.velocity = strToDouble(velocity_str); | |||
if (jl.velocity < 0.0) | |||
{ | |||
CONSOLE_BRIDGE_logError("velocity value (%s) is negative", velocity_str); |
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 would say that it would help parsing the error logs to say velocity limit
instead of velocity value
but the rest of the fie seems to already be written that way.
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.
Sure
@@ -156,12 +161,80 @@ bool parseJointLimits(JointLimits &jl, tinyxml2::XMLElement* config) | |||
{ | |||
try { | |||
jl.velocity = strToDouble(velocity_str); | |||
if (jl.velocity < 0.0) |
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.
Is a value of zero valid for velocity, acceleration, and jerk limits? Seems to only make sense as a backward way of disabling the joint.
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.
Right now, by default the velocity limit is set to zero, that's the reason I'm only checking for the negative values
@forrest-rm We already have the first version of the limit enforcement already integrated into the ros2_control (ros-controls/ros2_control#2047). Once this is merged, we will add support for considering the acceleration, deceleration and jerk limits too |
Needs ros/urdfdom_headers#83
This is needed to be able to parse the newly added limits of acceleration, deceleration and jerk, this would be pretty much useful to integrate them into the ros2_control architecture