0
$\begingroup$

Rosanswers logo

Hello I want to install the xv_11_laser_driver http://www.ros.org/wiki/xv_11_laser_driver/Tutorials/Running%20the%20XV-11%20Node

when I write: rosrun xv_11_laser_driver neato_laser_publisher _port:=/dev/ttyUSB0

a message appears [rospack] couldn't find package [xv_11_laser_driver]

UPDATE 1: I tried the command . ~/cwru-ros-pkg/setup.bash in each terminal

But it gives me an other error message: ERROR [1326667355.420881814]: Error instantiating laser object. Are you sure you have the correct port and baud rate? Error was No such file or directory

When I looked in the file dev, I could not find files that are called ttyUSB

UPDATE 2: You are right the problem was the cable. Now in the "dev" I find the file "ttyUSB0", and when I put "lsusb": Bus 006 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC But the problem is not fully resolved, when I run rviz, a message appears:

Fixed Frame No tf data. Actual error: Fixed Frame [/map] does not exist

Note: when I put the command "roscore", he writes a few lines, then: started core service [/rosout]. After it no longer gives me the opportunity to write other commands, I have to open a new terminal, where I write: rosrun xv_11_laser_driver neato_laser_publisher _port:=/dev/ttyUSB0 . Is this normal?

When I add Laser Scan, a message appears Topic: No messages received [URL=http://imageshack.us/photo/my-images/28/capture1du.png/][IMG=http://img28.imageshack.us/img28/8113/capture1du.png][/IMG][/URL]


Originally posted by SalutBonjour on ROS Answers with karma: 11 on 2012-01-15

Post score: 1


Original comments

Comment by Eric Perko on 2012-01-16:
Include in your question, to help with debugging. It's easier to spot problems if you also post the output of the commands themselves.

Comment by SalutBonjour on 2012-01-16:
I tried rosrun xv_11_laser_driver neato_laser_publisher _port:=/dev/ttyUSB0 _firmware_version:=2, no chang. I did not understand the part: "include the output of both rostopic commands"

Comment by Eric Perko on 2012-01-16:
Try the rostopic and fimware_version related bits of my updated answer and, if you still have problems, please include the output of both rostopic commands. Obviously these need to be run while both the roscore and xv_11 driver are running.

Comment by SalutBonjour on 2012-01-16:
See the picture in my question

Comment by SalutBonjour on 2012-01-16:
It has changed nothing

Comment by Eric Perko on 2012-01-16:
You need to set your FixedFrame to '/neato_laser' from '/map'. If you set the frame_id parameter, you'll have to use whatever you set it to instead of '/neato_laser'.

Comment by Eric Perko on 2012-01-16:
See my updated answer for some debugging steps and possibly changing the firmware version - incorrect firmware version selection may not ever find the sync bytes and start publishing.

Comment by ahendrix on 2012-01-16:
Have you chosen a valid Fixed Frame?

Comment by SalutBonjour on 2012-01-16:
When I add Laser Scan, a message appears Topic: No messages received

Comment by ahendrix on 2012-01-16:
Yes, it is normal that you have to dedicate a terminal to running roscore. Your frame error is because you don't have a valid fixed frame selected. In the upper part of the left bar, use the dropdown for Fixed Frame to select a different frame.

Comment by SalutBonjour on 2012-01-16:
thank you for your answers, see the update to my question

Comment by Eric Perko on 2012-01-15:
I'm not sure about trying it on a Windows PC. You'd have to check the SparkFun documentation. Either way, you need the serial adapter to be recognized before the xv_11 driver will work. Maybe the USB cable or adapter itself are faulty? It should appear in /dev even if not connected to an xv_11...

Comment by SalutBonjour on 2012-01-15:
is that possible to try it on another Windows PC? because when I try it, I have not detected in device manager

Comment by Eric Perko on 2012-01-15:
Hmm... I don't see the serial adapter anywhere in that output. The Chicony Electronics device appears to be a webcam. Have you tried plugging the laser into another computer to see if it recognizes the serial adapter?

Comment by SalutBonjour on 2012-01-15:
lsusb Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 04f2:b083 Chicony Electronics Co., Ltd Bus 001 Device 001: ID 1db:0002 Linux Foundation 2.0 root hub

Comment by Eric Perko on 2012-01-15:
Could you add the output of lsusb to your question? Please unplug any extra USB devices that you can and plug the laser's serial adapter directly into the computer (no hubs) before recording the output. This will cut down on the amount of output.

Comment by Eric Perko on 2012-01-15:
See the update to my answer regarding not being able to open the /dev/ttyUSB device.

Comment by Eric Perko on 2012-01-15:
Did you do all of the rosinstall steps? You were able to . /cwru-ros-pkg/setup.bash? And rosmake successfully built it?

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Assuming it built successfully, you probably tried to run it in a different terminal environment. Since the cwru-ros-pkg checkout (which contains the xv_11_laser_driver) is not part of the system ROS installation, you'll need to do . ~/cwru-ros-pkg/setup.bash in each terminal you want to use the driver in.

Alternatively, you could add . ~/cwru-ros-pkg/setup.bash to your ~/.bashrc to have it automatically included in all terminals.

UPDATE 1: You have to give the driver the path to a valid serial port. If you have no /dev/ttyUSB* devices, are you certain the serial adapter is connected properly (there may also be some lights on the SparkFun adapter, but I don't recall if those only light when the adapter is communicating or also just when plugged in)? Do you have any /dev/ttyACM* devices?

Directions for hooking up the laser are here: Connecting the XV-11 Laser to USB

UPDATE 2: The root of the trouble connecting to the serial adapter was a faulty USB cable. As far as launching things in separate terminals, that is completely normal. Your fixed_frame in RVIZ should be neato_laser by default, unless you change the frame_id parameter to something else. It should be available in the drop-down menus once you subscribe to the scan topic.

Regarding the trouble receiving scans, make sure you set the topic after adding a LaserScan display to rviz. The topic defaults to /scan. If you still get that error, in a new terminal, run rostopic list and verify that /scan (or whatever you may have remapped the scan topic to) is in the list. Run rostopic hz /scan to make sure you are getting data (it should report data coming out at either 5 or 10 Hz).

If you still don't get any data, try starting your driver node with the other firmware version (see the documentation for details on that parameter. For a quick check, just try rosrun xv_11_laser_driver neato_laser_publisher _port:=/dev/ttyUSB0 _firmware_version:=2 to see if that gets you good looking data in rviz.


Originally posted by Eric Perko with karma: 8406 on 2012-01-15

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by SalutBonjour on 2012-01-15:
yes, exactly as the link. I use Sparkfun module

Comment by Eric Perko on 2012-01-15:
I've put the link in my answer.

Comment by SalutBonjour on 2012-01-15:
the link does not work

Comment by Eric Perko on 2012-01-15:
I assume you did connect the laser to the computer following the directions here: http://www.ros.org/wiki/xv_11_laser_driver/Tutorials/Connecting%20the%20XV-11%20Laser%20to%20USB . Is that the case?

Comment by SalutBonjour on 2012-01-15:
Thank you for your answer No there is not no files ttyACM*

$\endgroup$
0
$\begingroup$

Rosanswers logo

It sounds like you need to download the code for the xv_11_laser_driver, add it to your ROS_PACKAGE_PATH and compile it.

Take a look here if you need more help: http://answers.ros.org/question/169/how-do-i-install-a-missing-ros-package


Originally posted by ahendrix with karma: 47576 on 2012-01-15

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by IGAPants on 2016-08-25:
Hello, I'm trying to do the same thing as you do.

I'm asking this before (http://answers.ros.org/question/242241/need-help-for-running-the-xv-11-laser-node/).

Can i know what ROS you have installed for running the xv-11 laser driver? And what should i do for having "cwru-ros-pkg environment setup"

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.