Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Commit 9f6b85d

Browse files
committed
Bugfix #158 (driver termination)
Modified sopas startup sequence
1 parent 169f5bd commit 9f6b85d

File tree

5 files changed

+51
-17
lines changed

5 files changed

+51
-17
lines changed

CHANGELOG.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
Changelog for package sick_scan
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
1.12.0
6+
-------------------
7+
* bugfix #158 (driver terminates)
8+
* modified SOPAS-startup sequence
9+
10+
11+
1.11.0 (2021-07-13)
12+
-------------------
13+
* Added option min_intensity
14+
515
1.10.1 (2021-03-18)
616
-------------------
717
* Update ipconfig.md

driver/src/sick_generic_caller.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@
120120
// 1.7.6: 2020-07-14: NAV310 handling optimized (angle calculation and compensation), barebone quaterion to euler
121121
// 1.7.7: 2020-07-21: barebone quaterion to euler
122122
#define SICK_GENERIC_MAJOR_VER "1"
123-
#define SICK_GENERIC_MINOR_VER "10"
124-
#define SICK_GENERIC_PATCH_LEVEL "1"
123+
#define SICK_GENERIC_MINOR_VER "12"
124+
#define SICK_GENERIC_PATCH_LEVEL "0"
125125

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

@@ -131,7 +131,7 @@ std::string getVersionInfo();
131131
/*!
132132
\brief Startup routine - if called with no argmuments we assume debug session.
133133
Set scanner name variable by parsing for "__name:=". This will be changed in the future
134-
by setting a parameter. Calls mainGenericLaser after parsing.
134+
by setting a parameter. Calls mainGenericLaser after parsing.
135135
136136
\param argc: Number of Arguments
137137
\param argv: Argument variable

driver/src/sick_scan_common.cpp

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2434,20 +2434,6 @@ namespace sick_scan
24342434
}
24352435
else
24362436
{
2437-
// initializing sequence for laserscanner
2438-
// is this device a TiM240????
2439-
// The TiM240 can not interpret CMD_START_MEASUREMENT
2440-
if (this->parser_->getCurrentParamPtr()->getScannerName().compare(SICK_SCANNER_TIM_240_NAME) == 0)
2441-
{
2442-
// the TiM240 operates directly in the ros coordinate system
2443-
// do nothing for a TiM240
2444-
}
2445-
else
2446-
{
2447-
startProtocolSequence.push_back(CMD_START_MEASUREMENT);
2448-
}
2449-
startProtocolSequence.push_back(CMD_RUN); // leave user level
2450-
startProtocolSequence.push_back(CMD_START_SCANDATA);
24512437

24522438
if (parser_->getCurrentParamPtr()->getUseEvalFields() == USE_EVAL_FIELD_TIM7XX_LOGIC || parser_->getCurrentParamPtr()->getUseEvalFields() == USE_EVAL_FIELD_LMS5XX_LOGIC)
24532439
{
@@ -2472,6 +2458,21 @@ namespace sick_scan
24722458
}
24732459
}
24742460

2461+
// initializing sequence for laserscanner
2462+
// is this device a TiM240????
2463+
// The TiM240 can not interpret CMD_START_MEASUREMENT
2464+
if (this->parser_->getCurrentParamPtr()->getScannerName().compare(SICK_SCANNER_TIM_240_NAME) == 0)
2465+
{
2466+
// the TiM240 operates directly in the ros coordinate system
2467+
// do nothing for a TiM240
2468+
}
2469+
else
2470+
{
2471+
startProtocolSequence.push_back(CMD_START_MEASUREMENT);
2472+
}
2473+
startProtocolSequence.push_back(CMD_RUN); // leave user level
2474+
startProtocolSequence.push_back(CMD_START_SCANDATA);
2475+
24752476
if (this->parser_->getCurrentParamPtr()->getNumberOfLayers() == 4) // MRS1104 - start IMU-Transfer
24762477
{
24772478
ros::NodeHandle tmp("~");

test/scripts/readme.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
A simple lidar emulator for development and test purposes can be found in folder test/emulator. It implements a simple tcp server, which responds to binary cola messages and sends predefined LMDscandata to a tcp-client. The sick_scan driver can connect to the local test server instead of the lidar device for offline-tests.
2+
3+
To build the test server, activate cmake option `ENABLE_EMULATOR` in CMakeLists.txt and rebuild sick_scan. By default, option `ENABLE_EMULATOR` is switched off.
4+
5+
To run the test server, start sick_scan with one of the emulator launchfiles in test/emulator/launch, f.e.
6+
```
7+
roslaunch sick_scan emulator_01_default.launch # emulate TiM 7xx
8+
roslaunch sick_scan emulator_lms1xx.launch # emulate LMS 1xx
9+
roslaunch sick_scan emulator_lms5xx.launch # emulate LMS 5xx
10+
```
11+
12+
Then start the driver with option hostname:=127.0.0.1, f.e.
13+
```
14+
roslaunch sick_scan sick_tim_7xx.launch hostname:=127.0.0.1
15+
```
16+
17+
To visualize the emulation in rviz, run
18+
```
19+
rosrun rviz rviz -d ./src/sick_scan/test/emulator/config/rviz_emulator_cfg.rviz
20+
```
21+
22+
Please note, that the test server does not emulate a lidar device in details. It simply replies predefined cola responses to the driver and sends LMDscandata from the json-files in test/emulator/scandata for diagnosis and offline-tests. Examples to build and run offline-tests can be found in folder test/scripts.

test/scripts/run_simu_tim7xx_tim7xxS.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ for sick_scan_launch_file in sick_tim_7xx.launch sick_tim_7xxS.launch ; do
4242
# rosservice call /sick_tim_7xx/ColaMsg "{request: 'sRN LIDinputstate'}" # response: "sRA LIDinputstate \\x00\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x00\\x00"
4343
# rostopic echo "/sick_tim_7xxS/lferec" &
4444
# rostopic echo "/sick_tim_7xxS/lidoutputstate" &
45+
rostopic echo /diagnostics &
4546

4647
# Wait for 'q' or 'Q' to exit or until rviz is closed
4748
while true ; do

0 commit comments

Comments
 (0)