SICKAG / sick_scan

sick_scan is an open-source project to support the laser scanner of the company SICK using the ROS-framework
Apache License 2.0
130 stars 104 forks source link

LMS-111 Error: Sopas answer mismatch (sWNLMPoutputRange) #44

Closed Roboterbastler closed 5 years ago

Roboterbastler commented 5 years ago

Hi,

I'm trying to use the driver with a LMS-111. When launching the first time after a power-down I always get this error:

[ERROR] [1560261863.146976851][/sick_left_lms111_driver][/tmp/binarydeb/ros-melodic-sick-scan-0.0.16/driver/src/sick_scan_common.cpp:751]: Error Sopas answer mismatch Error unexpected Sopas Answer for request <STX>sWNLMPoutputRange 1 1388 FFF24460 2932E0<ETX>Answer= >>>sFA 4<<<

When I restart the node without powering off in between the error doesn't appear again. It only occurs when launched the first time.

The launch file I use looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<launch>
  <arg name="host" />
  <arg name="frame_id" />
  <arg name="name" default="sick_lms111_driver" />
  <arg name="topic" default="scan_raw" />

  <node name="$(arg name)" pkg="sick_scan" type="sick_generic_caller">
    <param name="frame_id" type="str" value="$(arg frame_id)" />
    <param name="use_binary_protocol" type="bool" value="False" />
    <param name="scanner_type" type="string" value="sick_lms_1xx"/>
    <param name="range_max" type="double" value="20.0" />
    <param name="hostname" type="string" value="$(arg host)" />
    <param name="port" type="string" value="2112" />
    <param name="timelimit" type="int" value="5" />

    <remap from="scan" to="$(arg topic)" />
  </node>
</launch>

I've checked and the output on that port 2112 should be set to ASCII mode.

Do you know what could be causing this error?

Best, Jacob

michael1309 commented 5 years ago

Hello, Jacob,

this error is caused by an incorrect angle setting the scanner then uses the default settings. in the file https://github.com/SICKAG/sick_scan/blob/master/launch/sick_lms_1xx.launch you will find the right angle parameters for a launch file:

<param name="min_ang" type="double" value="-1.658" />
<param name="max_ang" type="double" value="1.658" />

That should fix your problem.

Best regards Michael