Ask Your Question
1

I can't get data from laserscanner Sick s300

asked 2015-05-27 13:59:17 -0500

Lil Kmer gravatar image

updated 2020-08-14 17:55:56 -0500

jayess gravatar image

I have a mecanum-robot with 2 laserscanner (Sick s300 professional) and they are both connected with the robot via serial port (/dev/ttyS0 and /dev/ttyS2). I have installed the cob_sick_s300 package and i create a launch file (laser_front.launch) in cob_bringup pakage and it's look like this:

<?xml version="1.0"?>
<launch>

    <arg name="robot" default="cob3-6"/>
    <arg name="pkg_hardware_config" default="$(find cob_hardware_config)"/>
    <arg name="name" default="front"/>

    <!-- start laser driver -->
    <node name="laser_$(arg name)" pkg="cob_sick_s300" type="cob_sick_s300" respawn="false" output="screen" >
        <rosparam command="load" file="$(arg pkg_hardware_config)/$(arg robot)/config/laser_$(arg name).yaml"/>
        <!--remap from="laser_$(arg name)/scan" to="/scan_$(arg name)_raw"/-->
    </node>

</launch>

my laser_front.yaml look like this:

port: /dev/ttyS0

baud: 500000

scan_duration: 0.025 #no info about that in SICK-docu, but 0.025 is believable and looks good in rviz

scan_cycle_time: 0.040 #SICK-docu says S300 scans every 40ms

inverted: false # is already inverted in sick firmare configuration

scan_id: 7

frame_id: /base_laser_front_link

publish_frequency: 12

scan_intervals: [[-1.3526, 1.361357]] #[rad] these intervals are included to the scan

fields: 
 '1':
  scale: 0.01

  start_angle: -2.355

  stop_angle: 2.355

I launched : roslaunch cob_bringup laser_front.launch and in a second terminal i wan't to see laserscanner data whit : rostopic echo /laser_front/scan .

The problem is that my second Terminal shows nothing and i don't know why. i think that i should be able to see some data produced by the scanner.

Please, has anyone an idea ? I will appreciate any help. Thank you very much.

edit retag flag offensive close merge delete

Comments

Have you tried to view the serial data with a terminal program? (or just cat /dev/ttyS0 , just to see if the scanner are sending data? ) Configure the Scanners to send data continuously for this test.

Do your ports support RS-422 and 500k baud? Can your S300 send data? The cheaper ones can't.

fsteinhardt gravatar image fsteinhardt  ( 2016-06-29 05:42:36 -0500 )edit

hey, I am running into the same problem. In addition, my sick laser is displaying f-9 error, which corresponds to an ossd-wiring problem.

Did you solve the problem, and maybe give me some hint?

Thanks in advance.

Fookii gravatar image Fookii  ( 2020-08-13 15:03:01 -0500 )edit

@Fookii this is a 5 year old question with a 4 year old answer. If the answer doesn't work for you, then you should create a new question and reference this one

jayess gravatar image jayess  ( 2020-08-14 17:57:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-28 14:40:14 -0500

pilleatus gravatar image

When you load the parameters inside the node, the name of the parameter on the parameter-server will be for example laser_front/port, but the node needs port

You can load the parameters outside of the node tags.

<arg name="robot" default="cob3-6"/>
<arg name="pkg_hardware_config" default="$(find cob_hardware_config)"/>
<arg name="name" default="front"/>

<rosparam command="load" file="$(arg pkg_hardware_config)/$(arg robot)/config/laser_$(arg name).yaml"/>

<!-- start laser driver -->
<node name="laser_$(arg name)" pkg="cob_sick_s300" type="cob_sick_s300" respawn="false" output="screen" />
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-05-27 13:59:17 -0500

Seen: 972 times

Last updated: Aug 14 '20