ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Setting port for hokuyo laser range scanner

asked 2015-12-07 06:33:28 -0600

Oevli gravatar image

updated 2017-09-30 15:49:37 -0600

ahendrix gravatar image

Hello

I have written the following launch file:

<launch>
  <node
    pkg="mark_pi_navigation"
    type="mark_pi_navigation.py"
    name="mark_pi_navigation"
    respawn="true">
  </node>
  <node
    pkg="hokuyo_node"
    type="hokuyo_node"
    name="hokuyo_node"
    respawn="true">
    <param name="port" value="/dev/ttyACM2"/>
  </node>
  <node
    pkg="razor_imu_9dof"
    type="imu_node.py"
    name="imu_node" >
    <param name="port" value="/dev/ttyUSB0"/>
  </node>
  <node
    pkg="rosserial_python"
    type="serial_node.py"
    name="arduinoLeft"
    respawn="true">
    <param name="port" value="/dev/ttyACM0"/>
  </node>
  <node
    pkg="rosserial_python"
    type="serial_node.py"
    name="arduinoRight"
    respawn="true">
    <param name="port" value="/dev/ttyACM1"/>
  </node>
</launch>

I am experiencing some issues with setting the right port for the hokuyo LRS. If I change the port to ACM0 (in launch file and physically) it works without problems... However it timeouts when trying to run from a different port.. I'm I writing the parameter wrong?

Thanks

edit retag flag offensive close merge delete

Comments

I've opened an issue about your question title not updating correctly: https://github.com/ros-infrastructure...

ahendrix gravatar image ahendrix  ( 2015-12-09 11:46:24 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-12-09 11:48:44 -0600

ahendrix gravatar image

It looks like you're configuring the port correctly. Are you certain your laser is actually represented by that device node?

Note that /dev/ttyACMx devices are created in the order that devices are plugged in; they're not automatically associated with a particular USB port or physical device.

edit flag offensive delete link more

Comments

yes I have used the ls -l /dev/ttyACM* command, and found the port names by unplugging the device.

Oevli gravatar image Oevli  ( 2015-12-09 14:16:03 -0600 )edit

Is there another process running which already has that port open? If there are multiple processes reading from a serial port, often only one of them will actually read data from it, and the others get nothing.

ahendrix gravatar image ahendrix  ( 2015-12-09 16:32:04 -0600 )edit
1

sudo lsof /dev/ttyACM1 may be able to get a list of processes which have that device open.

ahendrix gravatar image ahendrix  ( 2015-12-09 16:32:59 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-12-07 06:33:28 -0600

Seen: 455 times

Last updated: Sep 30 '17