Skip to content

Commit ff9b5e3

Browse files
committed
Set the defaults to the variables
Signed-off-by: Sai Kishor Kothakota <[email protected]>
1 parent 1240f09 commit ff9b5e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

urdf_parser/src/joint.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ bool parseJointLimits(JointLimits &jl, tinyxml2::XMLElement* config,
177177
const char* acceleration_str = config->Attribute("acceleration");
178178
if (version.less_than(1, 2) && acceleration_str != NULL) {
179179
CONSOLE_BRIDGE_logWarn("Ignoring acceleration attribute requiring URDF version 1.2 since specified version is 1.0.");
180+
jl.acceleration = std::numeric_limits<double>::infinity();
180181
}
181182
else {
182183
if (acceleration_str == NULL){
@@ -203,6 +204,7 @@ bool parseJointLimits(JointLimits &jl, tinyxml2::XMLElement* config,
203204
const char* deceleration_str = config->Attribute("deceleration");
204205
if (version.less_than(1, 2) && deceleration_str != NULL) {
205206
CONSOLE_BRIDGE_logWarn("Ignoring deceleration attribute requiring URDF version 1.2 since specified version is 1.0.");
207+
jl.deceleration = std::numeric_limits<double>::infinity();
206208
}
207209
else {
208210
if (deceleration_str == NULL){
@@ -229,6 +231,7 @@ bool parseJointLimits(JointLimits &jl, tinyxml2::XMLElement* config,
229231
const char* jerk_str = config->Attribute("jerk");
230232
if (version.less_than(1, 2) && jerk_str != NULL) {
231233
CONSOLE_BRIDGE_logWarn("Ignoring jerk attribute requiring URDF version 1.2 since specified version is 1.0.");
234+
jl.jerk = std::numeric_limits<double>::infinity();
232235
}
233236
else {
234237
if (jerk_str == NULL){

0 commit comments

Comments
 (0)