Ask Your Question
0

running multiple urg_nodes from launch file failed

asked 2020-07-17 05:32:59 -0500

Tahir M. gravatar image

I am running trying to run two Hukoyu lidars in a roslaunch file but it fails saying:

[ERROR] [1594981489.035509505]: Error connecting to Hokuyo: Could not open serial Hokuyo:
/dev/ttyACM0 @ 115200
could not open serial device.

But both of the sensors are connected which I can verify by running:

rosrun urg_node urg_node _ip_address:=192.168.131.15
[ INFO] [1594981672.086954627]: Connected to network device with intensity and ID: H1866449
[ INFO] [1594981672.131274440]: Streaming data.

Here is my laser.launch

<launch>

  <arg name="_ip_address"/>
  <node name="urg_node" 
        pkg="urg_node" 
        type="urg_node" 
        args="$(arg _ip_address)"
        >
  </node>

</launch>

and here is the lasers.launch file:

<launch>

  <include ns="front_laser" file="$(find mbs_lasers)/launch/laser.launch">
    <arg name="_ip_address" value="192.168.131.15" />
  </include>

  <include ns="rare_laser" file="$(find mbs_lasers)/launch/laser.launch">
    <arg name="_ip_address" value="192.168.131.20" />
  </include>

</launch>

I have seen a lot of questions on answers.ros.org, and checked several but the problem stays the same. I am not able to figure out where I am making a mistake. Any insights on it will be really appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-17 06:03:07 -0500

Tahir M. gravatar image

I was able to solve the problem by removing _ in the ip address and ip_address as param

<launch>

  <group ns="left">
    <node name="urg_node" pkg="urg_node" type="urg_node" output="screen">
      <param name="ip_address" value="192.168.0.9"/>

      <!-- <param name="serial_port" value="/dev/ttyACM0"/>
      <param name="serial_baud" value="115200"/> -->
      <param name="frame_id" value="laser"/>
      <param name="calibrate_time" value="false"/>
      <param name="publish_intensity" value="true"/>
      <param name="publish_multiecho" value="false"/>
      <param name="angle_min" value="-1.5707963"/>
      <param name="angle_max" value="1.5707963"/>
      <!-- <remap from="scan" to="front_scan"/> -->
    </node>
  </group>

  <group ns="right">
    <node name="urg_node" pkg="urg_node" type="urg_node" output="screen">
      <param name="ip_address" value="192.168.0.10"/>
      <!-- <param name="serial_port" value="/dev/ttyACM1"/>
      <param name="serial_baud" value="115200"/> -->
      <param name="frame_id" value="laser"/>
      <param name="calibrate_time" value="false"/>
      <param name="publish_intensity" value="true"/>
      <param name="publish_multiecho" value="false"/>
      <param name="angle_min" value="-1.5707963"/>
      <param name="angle_max" value="1.5707963"/>
      <!-- <remap from="scan" to="rare_scan"/> -->
    </node>
  </group>

</launch>
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

1 follower

Stats

Asked: 2020-07-17 05:32:59 -0500

Seen: 284 times

Last updated: Jul 17 '20