Closed yaowenx closed 6 years ago
I recommend to reprogram the scanner to COLA-Binary-protocol permanently. You can do this via using SOPAS ET after login to "authorized client" level. After switching you should save the parameter to the internal memory of the scanner (EEPROM).
Thank you for the help. I've changed the protocol using SOPAS ET. But a new error occured:
[ INFO] [1522139498.893607582]: Start initialising scanner ...
[ INFO] [1522139498.937214433]: Parameter setting for <active_echo: 0>
[ INFO] [1522139499.138351702]: Sending : sMN SetAccessMode \x03\xf4\x72\x47\x44
[ INFO] [1522139499.148951484]: Receiving: <STX>sAN SetAccessMode \x01<ETX>
[ INFO] [1522139499.349845796]: Sending : sWN EIHstCola \x01
[ INFO] [1522139499.360423893]: Receiving: <STX>sWA EIHstCola <ETX>
[ INFO] [1522139499.561644080]: Sending : sMN LMCstopmeas
[ INFO] [1522139500.585088572]: Receiving: <STX>sAN LMCstopmeas \x00<ETX>
[ INFO] [1522139500.785889030]: Sending : sRN DeviceIdent
[ INFO] [1522139500.796518770]: Receiving: <STX>sRA DeviceIdent \x00\x08\x4d\x52\x53\x36\x31\x32\x34\x52\x00\x0a\x31\x2e\x30\x2e\x31\x2e\x33\x33\x36\x52<ETX>
IdentLen: 8
[ INFO] [1522139500.797202126]: Deviceinfo MRS6124R V1.0.1.336R found and supported by this driver.
[ INFO] [1522139500.998284324]: Sending : sRN FirmwareVersion
[ INFO] [1522139501.008877317]: Receiving: <STX>sRA FirmwareVersion \x00\x0a\x31\x2e\x30\x2e\x31\x2e\x33\x33\x36\x52<ETX>
[ INFO] [1522139501.209769751]: Sending : sRN SCdevicestate
[ INFO] [1522139501.220375401]: Receiving: <STX>sRA SCdevicestate \x01<ETX>
[ INFO] [1522139501.421244748]: Sending : sRN ODoprh
[ INFO] [1522139501.432008044]: Receiving: <STX>sRA ODoprh \x00\x00\x08\x7b<ETX>
[ INFO] [1522139501.636605832]: Sending : sRN ODpwrc
[ INFO] [1522139501.647164790]: Receiving: <STX>sRA ODpwrc \x00\x00\x00\x4d<ETX>
[ INFO] [1522139501.853567867]: Sending : sRN LocationName
[ INFO] [1522139501.864100890]: Receiving: <STX>sRA LocationName \x00\x0b\x6e\x6f\x74\x20\x64\x65\x66\x69\x6e\x65\x64<ETX>
[ INFO] [1522139501.868801843]: Sending : sRN LMPoutputRange
[ INFO] [1522139501.879325019]: Receiving: <STX>sRA LMPoutputRange \x00\x01\x00\x00\x05\x14\x00\x04\x93\xe0\x00\x16\xe3\x60<ETX>
[ INFO] [1522139501.879681206]: MIN_ANG: -1.047 [rad] -60.000 [deg]
[ INFO] [1522139501.879836914]: MAX_ANG: 1.047 [rad] 60.000 [deg]
[ INFO] [1522139501.880163266]: Sending : sWN LMPoutputRange \x00\x01\x00\x00\x05\x14\x00\x04\x93\xe0\x00\x16\xe3\x60
[ INFO] [1522139501.890516571]: Receiving: <STX>sWA LMPoutputRange <ETX>
[ INFO] [1522139501.890699259]: Sending : sRN LMPoutputRange
[ INFO] [1522139501.900931632]: Receiving: <STX>sRA LMPoutputRange \x00\x01\x00\x00\x05\x14\x00\x04\x93\xe0\x00\x16\xe3\x60<ETX>
[ INFO] [1522139501.903980528]: MIN_ANG (after command verification): -1.047 [rad] -60.000 [deg]
[ INFO] [1522139501.904015460]: MAX_ANG (after command verification): 1.047 [rad] 60.000 [deg]
[ INFO] [1522139501.904139271]: Sending : sWN LMDscandatacfg \x1f\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01
[ INFO] [1522139501.914323634]: Receiving: <STX>sWA LMDscandatacfg <ETX>
[ INFO] [1522139501.914440747]: Sending : sRN LMDscandatacfg
[ INFO] [1522139501.924636436]: Receiving: <STX>sRA LMDscandatacfg \x1f\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01<ETX>
[ INFO] [1522139501.925559782]: Sending : sWN FREchoFilter \x02
[ INFO] [1522139501.935715882]: Receiving: <STX>sWA FREchoFilter <ETX>
[ INFO] [1522139501.935850195]: Sending : sMN LMCstartmeas
[ INFO] [1522139502.468069147]: Receiving: <STX>sAN LMCstartmeas \x00<ETX>
[ INFO] [1522139502.468548681]: Sending : sMN Run
[ INFO] [1522139502.479135372]: Receiving: <STX>sAN Run \x01<ETX>
[ INFO] [1522139502.479625218]: Sending : sEN LMDscandata \x01
[ INFO] [1522139502.490005015]: Receiving: <STX>sEA LMDscandata \x01<ETX>
[ WARN] [1522139504.491332880]: Timeout during waiting of new datagram
[ERROR] [1522139504.491516085]: Read Error when getting datagram: 1.
[ INFO] [1522139504.491904087]: Start initialising scanner ...
I can hear the sound the sensor makes. I assume that now the initialization is working but maybe the datagram setting might need change as well?
Hello, yaowenx,
We can reproduce that problem. Depending on the scanner status and the scanner firmware, it may take longer than 2 seconds for the first scan data to arrive.
Therefore, the value for the timeout "maxWaitInMs" should be changed to 30000 ms.
You can find the timeout in the file driver/src/sick_scan_common_tcp.cpp
This file should then be changed as follows:
711 int SickScanCommonTcp::get_datagram(unsigned char* receiveBuffer, int bufferSize, int* actual_length, bool isBinaryProtocol)
{
712 this->setReplyMode(1);
713 const int maxWaitInMs = 30000;
We will fix this problem in the next release thanks for the hint.
Hi Michael,
Thank you again for the help. Now it is running without error. But the cloud looks a little bit weird The part in the black box is a flat wall surface and the view is topdown. But it looks like that there's multiple layers of the wall and each layer consists of small arcs. I first think it is the multi-echo feature but I tried first echo, all echo and last echo settings, they all looks the same. It is actually the same as what I saw in SOPASair. So it is probably not a bug in your code. But do you have any idea why the cloud looks like this? Maybe something wrong in the firmware? My sensor is using 1.0.1.336R firmware. Thank you
Hello yaowenx,
I think that what you see is not a bug in the scanner or the code,but for objects that are close to the scanner, the distance quantisation of 12.5 cm can be seen in Rviz.
If you don't use a top-down orthographic camera in rviz, there will be additional distortions caused by the projection.
The MRS6124 delivers impressive recordings in the far field.
If you have the opportunity, take a test outdoors.
Best regards Michael
Hello, I am also trying to launch the driver for MRS6124R. But even after changing the protocol to Binary, I get the below error.
[ INFO] [1523273349.547360455]: Start initialising scanner ...
1523273349.5475 Warning: Tcp::write: Failed to send data to socket.
[ERROR] [1523273369.927893985]: no answer received after 20000 ms. Maybe sopas mode is wrong.
[ERROR] [1523273369.928035805]: sendSOPASCommand: no full reply available for read after 20000 ms
SOPAS - Error stopping streaming scan data!
[ WARN] [1523273369.928374863]: Disconnecting TCP-Connection.
sick_scan driver exiting.
1523273499.7376 ERROR: Tcp::open: Failed to open TCP connection to 192.168.0.24, aborting.
[ INFO] [1523273499.743618277]: Parameter setting for <active_echo: 0>
[ INFO] [1523273499.944271010]: Sending : sMN SetAccessMode \x03\xf4\x72\x47\x44
1523273499.9444 Warning: Tcp::write: Failed to send data to socket.
[ERROR] [1523273505.039736946]: no answer received after 5000 ms. Maybe sopas mode is wrong.
[ERROR] [1523273505.039904852]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1523273505.040206259]: Receiving: <STX><ETX>
[ERROR] [1523273505.040513862]: SOPAS Communication -Error unexpected Sopas Answer for request <STX><STX><STX><STX>sMN SetAccessMode <ETX>rGD
[ INFO] [1523273505.041279125]: Sending : sMN SetAccessMode 3 F4724744
1523273505.0414 Warning: Tcp::write: Failed to send data to socket.
[ERROR] [1523273510.135328661]: no answer received after 5000 ms. Maybe sopas mode is wrong.
[ERROR] [1523273510.135490299]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1523273510.135741709]: Receiving: <STX><ETX>
[ERROR] [1523273510.135886521]: SOPAS Communication -Error unexpected Sopas Answer for request <STX>sMN SetAccessMode 3 F4724744<ETX>
[ERROR] [1523273510.136251626]: Error Access Mode
[ INFO] [1523273510.336915862]: Sending : sWN EIHstCola 1
1523273510.3372 Warning: Tcp::write: Failed to send data to socket.
[ERROR] [1523273515.431311557]: no answer received after 5000 ms. Maybe sopas mode is wrong.
[ERROR] [1523273515.431508571]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1523273515.431857316]: Receiving: <STX><ETX>
[ERROR] [1523273515.432196197]: SOPAS Communication -Error unexpected Sopas Answer for request <STX>sWN EIHstCola 1<ETX>
[ERROR] [1523273515.432697692]: Command or Error message not defined
[ERROR] [1523273515.432890800]: Failed to init scanner Error Code: 1
Waiting for timeout...
If the communication mode set in the scanner memory is different from that used by the driver, the scanner's communication mode is changed.
This requires a restart of the TCP-IP connection, which can extend the start time by up to 30 seconds. There are two ways to prevent this:
1. [Recommended] Set the communication mode with the SOPAS ET software to binary and save this setting in the scanner's EEPROM.
2. Use the parameter "sopas_protocol_type" to overwrite the default settings of the driver.
[ INFO] [1523273515.433070341]: Start initialising scanner ...
1523273515.4332 Warning: Tcp::write: Failed to send data to socket.
[ERROR] [1523273535.812481859]: no answer received after 20000 ms. Maybe sopas mode is wrong.
[ERROR] [1523273535.812639219]: sendSOPASCommand: no full reply available for read after 20000 ms
SOPAS - Error stopping streaming scan data!
[ WARN] [1523273535.812993309]: Disconnecting TCP-Connection.
sick_scan driver exiting.
1523273665.6256 ERROR: Tcp::open: Failed to open TCP connection to 192.168.0.24, aborting.
Is there anything else that I might be missing?
Thanks.
Hi,
could you ping the ip-address 192.168.0.24?
Did you use the most recent version in the devel branch?
Best regards,
Michael
Hello, I am also trying to launch the driver for MRS6124R. But even after changing the protocol to Binary, I get the below error.
[ INFO] [1523273349.547360455]: Start initialising scanner ... 1523273349.5475 Warning: Tcp::write: Failed to send data to socket. [ERROR] [1523273369.927893985]: no answer received after 20000 ms. Maybe sopas mode is wrong.
[ERROR] [1523273369.928035805]: sendSOPASCommand: no full reply available for read after 20000 ms
SOPAS - Error stopping streaming scan data! [ WARN] [1523273369.928374863]: Disconnecting TCP-Connection. sick_scan driver exiting. 1523273499.7376 ERROR: Tcp::open: Failed to open TCP connection to 192.168.0.24, aborting. [ INFO] [1523273499.743618277]: Parameter setting for <active_echo: 0> [ INFO] [1523273499.944271010]: Sending : sMN SetAccessMode \x03\xf4\x72\x47\x44 1523273499.9444 Warning: Tcp::write: Failed to send data to socket. [ERROR] [1523273505.039736946]: no answer received after 5000 ms. Maybe sopas mode is wrong.
[ERROR] [1523273505.039904852]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1523273505.040206259]: Receiving:
[ INFO] [1523273505.041279125]: Sending : sMN SetAccessMode 3 F4724744 1523273505.0414 Warning: Tcp::write: Failed to send data to socket. [ERROR] [1523273510.135328661]: no answer received after 5000 ms. Maybe sopas mode is wrong.
[ERROR] [1523273510.135490299]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1523273510.135741709]: Receiving:
[ERROR] [1523273510.136251626]: Error Access Mode [ INFO] [1523273510.336915862]: Sending : sWN EIHstCola 1 1523273510.3372 Warning: Tcp::write: Failed to send data to socket. [ERROR] [1523273515.431311557]: no answer received after 5000 ms. Maybe sopas mode is wrong.
[ERROR] [1523273515.431508571]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1523273515.431857316]: Receiving:
[ERROR] [1523273515.432697692]: Command or Error message not defined [ERROR] [1523273515.432890800]: Failed to init scanner Error Code: 1 Waiting for timeout... If the communication mode set in the scanner memory is different from that used by the driver, the scanner's communication mode is changed. This requires a restart of the TCP-IP connection, which can extend the start time by up to 30 seconds. There are two ways to prevent this:
[ERROR] [1523273535.812639219]: sendSOPASCommand: no full reply available for read after 20000 ms
SOPAS - Error stopping streaming scan data! [ WARN] [1523273535.812993309]: Disconnecting TCP-Connection. sick_scan driver exiting. 1523273665.6256 ERROR: Tcp::open: Failed to open TCP connection to 192.168.0.24, aborting.
Is there anything else that I might be missing?
Thanks.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SICKAG/sick_scan/issues/6#issuecomment-379740150 , or mute the thread https://github.com/notifications/unsubscribe-auth/AfwOsYKfU2YCzF_Om4hTY3YH8Cszw9ULks5tm1jmgaJpZM4S7SUc . https://github.com/notifications/beacon/AfwOsRH6TaLNq4lShIYCbFwdziXYWGcOks5tm1jmgaJpZM4S7SUc.gif
Hi Michael,
Thanks for your reply. Yes I used the most recent version of the devel branch. However I am unable to ping the ip address. I could do so with Windows OS but not with Ubuntu.
Hello,
if the scanner is not reachable via Ping, I recommend you to check the network settings. Under Ubuntu you can check the IP settings with the command ifconfig. The local IP address must be in the same namespace. You are using the IP address 192.168.0.24 for the scanner. Therefore your computer should have an address according to the pattern 192.168.0.xxx (e.g. 192.168.0.100). The subnet mask should be 255.255.255.0.
You can set the IP address of the scanner in the corresponding launch file. The IP address set in the launch file and the IP address assigned via SOPAS-ET must match. The IP address set via SOPAS-ET must be stored in the scanner's eeprom. Therefore, the scanner must also be accessible from the Windows command line after closing SOPAS ET and repowering the scanner via ping. You must also disable DHCP for the used ethernet interface and switch to static ip addresses. As long as the scanner cannot be reached via ping, the ROS driver cannot run. I hope these hints will help you.
Best regards
Michael
I recommend to reprogram the scanner to COLA-Binary-protocol permanently. You can do this via using SOPAS ET after login to "authorized client" level. After switching you should save the parameter to the internal memory of the scanner (EEPROM).
Hi Michael,
I have started using a TIM 781 for a project. I too have had similar issues and saw in the launch file that I should change to CoLa B protocol using SOPAS, however I am not sure how to do this within the program. The only area I am able to find such a selection is within the console when issuing the sensor commands. Any info on how to achieve this would be immensely appreciated.
Thank you for your work, Daniel
@dpelaez10 You can try it out relatively easily by switching the lidar off and on again (repowering). The lidar then starts with the protocol stored in the EEPROM. Usually this is SOPAS-A (ASCII protocol). After switching to the binary mode, the network connection has to be disconnected and re-established. The lidar then uses the binary mode.
You can follow this very well in the console output.
Hi michael, i am new to sick mrs 1xxxx lidar, i was trying to connect mrs to ROS but not able to do. Even though i searched and tried since 1 month. could you please help me. i changed ip, ip connections are successful every time, checking the ip in ubuntu its pinging, sopas mode changed from ASCII to binary. still facing issue.
PARAMETERS
NODES / sick_mrs_1xxx (sick_scan/sick_generic_caller)
auto-starting new master process[master]: started with pid [9779] ROS_MASTER_URI=http://localhost:11311
[ INFO] [1624350320.124303354]: Connected to master at [localhost:11311]
setting /run_id to 6106f720-d333-11eb-bf27-c94be21df935
[ INFO] [1624350320.218252051]: Publishing laserscan-pointcloud2 to cloud
process[rosout-1]: started with pid [9790]
started core service [/rosout]
process[sick_mrs_1xxx-2]: started with pid [9797]
[ INFO] [1624350320.341048716]: sick_generic_caller V. 1.10.1
[ INFO] [1624350320.341323569]: Program arguments: /home/nabin/ros_catkin_ws/install/lib/sick_scan/sick_generic_caller
[ INFO] [1624350320.341506422]: Program arguments: name:=sick_mrs_1xxx
[ INFO] [1624350320.345587332]: Program arguments: log:=/home/nabin/.ros/log/6106f720-d333-11eb-bf27-c94be21df935/sick_mrs_1xxx-2.log
[ INFO] [1624350320.401923754]: Start initialising scanner [Ip: 192.168.0.1] [Port: 2112]
[ INFO] [1624350320.472020195]: Publishing laserscan-pointcloud2 to cloud
1624350450.2220 ERROR: Tcp::open: Failed to open TCP connection to 192.168.0.1, aborting.
1624350450.2226 ERROR: Tcp::open: Failed to open TCP connection to 192.168.0.1, aborting.
[ INFO] [1624350450.231670633]: Parameter setting for <active_echo: 0>
[ INFO] [1624350450.232935705]: Parameter setting for <active_echo: 0>
[ INFO] [1624350450.440426420]: Sending :
[ INFO] [1624350456.964687070]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1624350456.965164883]: Receiving:
[ INFO] [1624350456.966620618]: Sending :
[ INFO] [1624350456.989963911]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1624350456.998100471]: Receiving:
[ INFO] [1624350456.999713595]: Sending :
[ INFO] [1624350463.887277074]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1624350463.887421455]: Receiving:
[ERROR] [1624350463.887545891]: Error Access Mode [ERROR] [1624350463.946058401]: no answer received after 5000 ms. Maybe sopas mode is wrong.
[ INFO] [1624350463.946684395]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1624350463.946915378]: Receiving:
[ERROR] [1624350463.947776109]: Error Access Mode
[ INFO] [1624350464.088069449]: Sending :
[ INFO] [1624350471.003269564]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1624350471.004015237]: Receiving:
[ERROR] [1624350471.004967178]: Command or Error message not defined [ INFO] [1624350471.005381782]: Failed to init scanner Error Code: 1 Waiting for timeout... If the communication mode set in the scanner memory is different from that used by the driver, the scanner's communication mode is changed. This requires a restart of the TCP-IP connection, which can extend the start time by up to 30 seconds. There are two ways to prevent this:
[ INFO] [1624350471.036268231]: sendSOPASCommand: no full reply available for read after 5000 ms
[ INFO] [1624350471.036527939]: Receiving:
[ERROR] [1624350471.037515598]: Command or Error message not defined [ INFO] [1624350471.038533594]: Failed to init scanner Error Code: 1 Waiting for timeout... If the communication mode set in the scanner memory is different from that used by the driver, the scanner's communication mode is changed. This requires a restart of the TCP-IP connection, which can extend the start time by up to 30 seconds. There are two ways to prevent this:
This process is continuing...
please help me asap.
if i will run on this bellow command with a specific ip like
nabin@nabin-VirtualBox:~/ros_catkin_ws/src$ roslaunch sick_scan sick_mrs_1xxx.launch hostname:=192.168.0.117
PARAMETERS
NODES / sick_mrs_1xxx (sick_scan/sick_generic_caller)
auto-starting new master process[master]: started with pid [10111] ROS_MASTER_URI=http://localhost:11311
setting /run_id to 6c1001b4-d335-11eb-bf27-c94be21df935
process[rosout-1]: started with pid [10121]
started core service [/rosout]
process[sick_mrs_1xxx-2]: started with pid [10128]
[ INFO] [1624351198.345576082]: sick_generic_caller V. 1.10.1
[ INFO] [1624351198.345736811]: Program arguments: /home/nabin/ros_catkin_ws/install/lib/sick_scan/sick_generic_caller
[ INFO] [1624351198.345831371]: Program arguments: name:=sick_mrs_1xxx
[ INFO] [1624351198.345980947]: Program arguments: log:=/home/nabin/.ros/log/6c1001b4-d335-11eb-bf27-c94be21df935/sick_mrs_1xxx-2.log
[ INFO] [1624351198.371821687]: Start initialising scanner [Ip: 192.168.0.117] [Port: 2112]
[ INFO] [1624351198.438833215]: Publishing laserscan-pointcloud2 to cloud
[ INFO] [1624351198.448055095]: Parameter setting for <active_echo: 0>
[ INFO] [1624351198.649372577]: Sending :
After a long time also no changes. what does it mean? please help me to connect with ROS
Hello,
basically everything looks very good. After the startup sequence runs through, Pointcloud2 messages are sent and the log output is muted. We recommend you to read the introductory guide.
For startup with rviz etc. you can refer to e.g. the ticket https://github.com/SICKAG/sick_scan/issues/122 for help.
Good luck!
Thank you, very much michael. i solved... thanks for your help. i Really love it.
Hi, I'm trying to use the driver for mrs6124, but roslaunch gives the error as below:
I'm quite new with sick sensors. Is there a option where I can change sopas mode as the error message suggests?
Thanks