Ask Your Question
0

Setting port for hokuyo laser range scanner

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

Oevli gravatar image

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

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 imageahendrix ( 2015-12-09 11:46:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

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 imageOevli ( 2015-12-09 14:16:03 -0500 )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 imageahendrix ( 2015-12-09 16:32:04 -0500 )edit
1

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

ahendrix gravatar imageahendrix ( 2015-12-09 16:32:59 -0500 )edit

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: 2015-12-07 06:33:28 -0500

Seen: 213 times

Last updated: Sep 30 '17