Skip to content

Commit

Permalink
Merge pull request #68 from SICKAG/feature/lms511-min_max_angles
Browse files Browse the repository at this point in the history
  • Loading branch information
rostest committed May 26, 2022
1 parent 9af342c commit d6b819a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ features that will be removed in future versions **Removed** for deprecated feat

## Released ##

### v2.6.7 -
- **Update** LMS511 configuration #67

### v2.6.6 -
- **Update** NAV310 + LRS4xxx update, issues #58, #59, #60, #61

Expand Down
2 changes: 1 addition & 1 deletion driver/src/sick_generic_caller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@

#define SICK_GENERIC_MAJOR_VER "2"
#define SICK_GENERIC_MINOR_VER "6"
#define SICK_GENERIC_PATCH_LEVEL "6"
#define SICK_GENERIC_PATCH_LEVEL "7"

#include <algorithm> // for std::min

Expand Down
16 changes: 16 additions & 0 deletions driver/src/sick_scan_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,12 @@ namespace sick_scan
config_.min_ang = -M_PI;
config_.max_ang = +M_PI;
}
else if (parser_->getCurrentParamPtr()->getScannerName().compare(SICK_SCANNER_LMS_5XX_NAME) == 0)
{
// LMS min/max angles currently set to +-95 degree
config_.min_ang = -95.0 * M_PI / 180.0;
config_.max_ang = +95.0 * M_PI / 180.0;
}

// datagram publisher (only for debug)
rosDeclareParam(nh, "publish_datagram", false);
Expand Down Expand Up @@ -554,6 +560,16 @@ namespace sick_scan
config_.max_ang = +M_PI;
}
}
else if (parser_->getCurrentParamPtr()->getScannerName().compare(SICK_SCANNER_LMS_5XX_NAME) == 0)
{
// LMS min/max angles currently set to +-95 degree
if(std::abs(config_.min_ang + 95.0 * M_PI / 180.0) > FLT_EPSILON || std::abs(config_.max_ang - 95.0 * M_PI / 180.0) > FLT_EPSILON)
{
ROS_WARN_STREAM("## WARNING: configured min/max_angle = " << config_.min_ang << "," << config_.max_ang << " not supported. min/max_angle = -95,+95 degree will be used.");
config_.min_ang = -95.0 * M_PI / 180.0;
config_.max_ang = +95.0 * M_PI / 180.0;
}
}

cloud_marker_ = 0;
publish_lferec_ = false;
Expand Down

0 comments on commit d6b819a

Please sign in to comment.