Skip to content

Commit d0d7d3a

Browse files
committed
Use acceleration limit when no deceleration limit is present
Signed-off-by: Sai Kishor Kothakota <[email protected]>
1 parent 6391e39 commit d0d7d3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

urdf_parser/src/joint.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ bool parseJointLimits(JointLimits &jl, tinyxml2::XMLElement* config)
191191
// Get joint deceleration limit
192192
const char* deceleration_str = config->Attribute("deceleration");
193193
if (deceleration_str == NULL){
194-
CONSOLE_BRIDGE_logDebug("urdfdom.joint_limit: no deceleration, using default value");
195-
jl.deceleration = std::numeric_limits<double>::infinity();
194+
CONSOLE_BRIDGE_logDebug("urdfdom.joint_limit: no deceleration, using acceleration limit");
195+
jl.deceleration = jl.acceleration;
196196
}
197197
else
198198
{
199199
try {
200200
jl.deceleration = strToDouble(deceleration_str);
201-
if(jl.deceleration < 0.0)
201+
if (jl.deceleration < 0.0)
202202
{
203203
CONSOLE_BRIDGE_logError("deceleration value (%s) is negative", deceleration_str);
204204
return false;

0 commit comments

Comments
 (0)