SICKAG / sick_safetyscanners

ROS driver for SICK safety laser scanners
https://www.sick.com/de/en/opto-electronic-protective-devices/safety-laser-scanners/c/g187225
Apache License 2.0
61 stars 59 forks source link

Can`t run two sick_safetyscanners at the same time #85

Closed fatgenius closed 2 years ago

fatgenius commented 3 years ago

hi, I do have two sick safety lidar in my robot. however I cant start this two lidar with one launch file at same time. i do have two lidar launch file those two different sick node was start with no problem. but sometimes theres one lidar no data received. can someone help me with this issue.

puck-fzi commented 3 years ago

Hi there,

yes you need a separate launch file for each lidar. each node can only process one lidar. For the no data received, did you check that all IPs are set correctly and that the ports are different for both sensors?

fatgenius commented 3 years ago

Hi there,

yes you need a separate launch file for each lidar. each node can only process one lidar. For the no data received, did you check that all IPs are set correctly and that the ports are different for both sensors?

Hi there, Thanks in advance. I do have separate launch file with different ip address. when I separate launch it works good. but when i put those two launch file in one bringup its dosent work well . Due to occasionally there`s one lidar no data received.

puck-fzi commented 3 years ago

Are the two nodes in separate namespaces then? this should help. If you post the contents of your launch file i can have a look through it

fatgenius commented 3 years ago

Are the two nodes in separate namespaces then? this should help. If you post the contents of your launch file i can have a look through it Hi there, really really appreciate it. I put the screen shot of my two lidar launch file and the lidar bringup file part here. Could you help me look through it. This problem really hitting me.

bringup
sick2 sick1
puck-fzi commented 3 years ago

On the first look it should be working. Don't see any apparent issues. Below is a setup of a main launch file I used for an application, maybe that helps. Mainly it just sets two node in two namespaces. And for the omitted parameters the default values will be used

<launch>
  <node pkg="sick_safetyscanners" type="sick_safetyscanners_node" name="sick_safetyscanners" output="screen" ns="sick_safetyscanners_front">
     <param name="sensor_ip" type="string" value="10.42.42.11" />
     <param name="host_ip" type="string" value="10.42.42.9" />
     <param name="host_udp_port" type="int" value="0" />
  </node>

  <node pkg="sick_safetyscanners" type="sick_safetyscanners_node" name="sick_safetyscanners_2" output="screen" ns="sick_safetyscanners_back">
     <param name="sensor_ip" type="string" value="10.42.42.12" />
     <param name="host_ip" type="string" value="10.42.42.9" />
     <param name="host_udp_port" type="int" value="0" />
  </node>

  <!-- node name="rqt_reconfigure" pkg="rqt_reconfigure" type="rqt_reconfigure" /-->
</launch>
fatgenius commented 3 years ago

On the first look it should be working. Don't see any apparent issues. Below is a setup of a main launch file I used for an application, maybe that helps. Mainly it just sets two node in two namespaces. And for the omitted parameters the default values will be used

<launch>
  <node pkg="sick_safetyscanners" type="sick_safetyscanners_node" name="sick_safetyscanners" output="screen" ns="sick_safetyscanners_front">
     <param name="sensor_ip" type="string" value="10.42.42.11" />
     <param name="host_ip" type="string" value="10.42.42.9" />
     <param name="host_udp_port" type="int" value="0" />
  </node>

  <node pkg="sick_safetyscanners" type="sick_safetyscanners_node" name="sick_safetyscanners_2" output="screen" ns="sick_safetyscanners_back">
     <param name="sensor_ip" type="string" value="10.42.42.12" />
     <param name="host_ip" type="string" value="10.42.42.9" />
     <param name="host_udp_port" type="int" value="0" />
  </node>

  <!-- node name="rqt_reconfigure" pkg="rqt_reconfigure" type="rqt_reconfigure" /-->
</launch>

Thanks again, its helps a lot. so far its working much more better than better. Since this problem is happens occasionally, I will do a long time test and let`s you know how it works.

reinzor commented 3 years ago

FYI, we are running two of these nodes on a robot in production and never encountered the problems you mention.

fatgenius commented 3 years ago

FYI, we are running two of these nodes on a robot in production and never encountered the problems you mention. I have no idea, why doesnt work good at my machine. I used nvidia xavier , sometimes theres one lidar no date, then I roslaunch to launch the no date lidar. it`s working again.

fatgenius commented 3 years ago

On the first look it should be working. Don't see any apparent issues. Below is a setup of a main launch file I used for an application, maybe that helps. Mainly it just sets two node in two namespaces. And for the omitted parameters the default values will be used

<launch>
  <node pkg="sick_safetyscanners" type="sick_safetyscanners_node" name="sick_safetyscanners" output="screen" ns="sick_safetyscanners_front">
     <param name="sensor_ip" type="string" value="10.42.42.11" />
     <param name="host_ip" type="string" value="10.42.42.9" />
     <param name="host_udp_port" type="int" value="0" />
  </node>

  <node pkg="sick_safetyscanners" type="sick_safetyscanners_node" name="sick_safetyscanners_2" output="screen" ns="sick_safetyscanners_back">
     <param name="sensor_ip" type="string" value="10.42.42.12" />
     <param name="host_ip" type="string" value="10.42.42.9" />
     <param name="host_udp_port" type="int" value="0" />
  </node>

  <!-- node name="rqt_reconfigure" pkg="rqt_reconfigure" type="rqt_reconfigure" /-->
</launch>

Hi , Thanks again. I`ve found it. we I launch two lidar. one launch file shows successfully launch node and data recived and another one is stoped at Tyoe Code: NANS3-CAAZ30AN1P04 and do not have data sick1111 sick2222

puck-fzi commented 3 years ago

This should not be stuck there, is your connection stable to the sensor? can you ping it throughout the process?

I will have a look into the code if I can find anything, however I was so far not able to reproduce this behaviour

LelandACM commented 3 years ago

@puck-fzi I encountered the same problem, and it still can’t reproduce。I tried according to your above method, but the problem is still not solved。A sensor has no data, it appears once every few days, irregularly. @fatgenius Is your problem solved now?

fatgenius commented 3 years ago

hi,the problem didn’t solve yet. But getting better now. Before it happens multiple times one day. Nowadays is once few days. I’m trying to change my router. I’ll keep updating the test results of my new router.

GitACDreamer @.***>于2021年9月17日 周五下午6:06写道:

@puck-fzi https://github.com/puck-fzi I encountered the same problem, and it still can’t reproduce。I tried according to your above method, but the problem is still not solved。A sensor has no data, it appears once every few days, irregularly. @fatgenius https://github.com/fatgenius Is your problem solved now?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/SICKAG/sick_safetyscanners/issues/85#issuecomment-921674872, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDHX6DOGLVG5UZ7LOZD6EDUCMHKTANCNFSM5CI2DKOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- kind regards !

LelandACM commented 3 years ago

hi,the problem didn’t solve yet. But getting better now. Before it happens multiple times one day. Nowadays is once few days. I’m trying to change my router. I’ll keep updating the test results of my new router.

tkx, anyway.

puck-fzi commented 2 years ago

I couldn't find anything in the code so far which might be related. It the problem still occurring? Did you manage to find a way?

puck-fzi commented 2 years ago

Hi, did you manage to find any insights? Please reopen if new insights to the problem are made