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

Sick LMS 200 not working with MobileSim

asked 2016-03-21 06:44:06 -0500

Surojit gravatar image

Hi!!,

I have installed ros jade in Ubuntu 14.04. I could successfully install the ROSARIA library in the catkin workspace. Then MobileSim, the simulator platform for ARIA was installed to test the functionality of the ROSARIA library. We found that the laser range finder (LRF) of the robot p3-dx, did not start when the robot was started using the command rosrun rosaria RosAria in simulated environment i.e., MobileSim. Then to use the LRF of the robot, the package sicktoolbox_wrapper was installed. Then we followed the steps suggested in the link http://wiki.ros.org/sicktoolbox_wrapp... to configure the parameters of the LRF. We could not locate the device file /dev/ttyUSB0, where the LRF is suppossed to be connected. This is possibly because we were working in the simulated environment, so no physical LRF was required to be connected to the system. Hence the connectivity of the LRF was not notified to the operating system, thus, no device file device file /dev/ttyUSB0 was observed in the system. To realise the device /dev/ttyUSB0 in the system, we used the command mknod with details of major and minor device id to create the device and followed the instructions detailed in the above link.

After the node is created, we parametarize the device with rosparam command and executed the command rosrun sicktoolbox_wrapper sicklms.

/============= Creating the device /dev/ttyUSB0 =============/

vecc-ros@veccros-desktop:~/catkin_ws/src$ sudo mknod /dev/ttyUSB0 c 188 0

vecc-ros@veccros-desktop:~/catkin_ws/src$ ll /dev/ttyUSB0

crw-r--r-- 1 root root 188, 0 Mar 21 03:28 /dev/ttyUSB0

vecc-ros@veccros-desktop:~/catkin_ws/src$ sudo chmod 666 /dev/ttyUSB0

/============= Setting the parameters of the device ===============/

vecc-ros@veccros-desktop:~/catkin_ws/src$ rosparam set sicklms/port /dev/ttyUSB0

vecc-ros@veccros-desktop:~/catkin_ws/src$ rosparam set sicklms/baud 38400

/============= The SickLMS application is started =============/

vecc-ros@veccros-desktop:~/catkin_ws/src$ rosrun sicktoolbox_wrapper sicklms

*** Attempting to initialize the Sick LMS...
Attempting to open device @ /dev/ttyUSB0

**ERROR: I/O exception - SickLMS2xx::_setupConnection: - Unable to open serial port ERROR: I/O exception - SickLMS2xx::_setupConnection: - Unable to open serial port Then we repeated the similar excercise for the serial device existing in the system i.e., /dev/ttyS0. This time the device was indentified, the sicklms application could start but failed to set the baud rate of the device.

/============ Setting the parameters of the device ===============/

vecc-ros@veccros-desktop:~/catkin_ws/src$ ll /dev/ttyS0

crw-rw---- 1 root dialout 4, 64 Mar 21 02:36 /dev/ttyS0

vecc-ros@veccros-desktop:~/catkin_ws/src$ sudo chmod 666 /dev/ttyS0

vecc-ros@veccros-desktop:~/catkin_ws/src$ rosparam set sicklms/port /dev/ttyS0

vecc-ros@veccros-desktop:~/catkin_ws/src$ rosparam set sicklms/baud 38400

/============= The serial paramters are set using setserial command ==============/

vecc-ros@veccros-desktop:~/catkin_ws/src$ setserial -a /dev/ttyS0 /dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4 Baud_base: 115200, close_delay: 50, divisor: 0 closing_wait: 3000 Flags: spd_cust skip_test

vecc-ros@veccros-desktop:~/catkin_ws/src$ sudo setserial /dev/ttyS0 baud_base 38400

vecc-ros@veccros-desktop:~/catkin_ws/src$ setserial -a /dev/ttyS0 /dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4 Baud_base: 38400, close_delay: 50 ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-05-31 15:10:05 -0500

zhengpf823 gravatar image

updated 2018-06-01 04:52:48 -0500

I've just solved this problem. It has nothing to do with the package sicktoolbox.

First choose you robot type with a laser sensor in MobileSim e.g. p3dx-lms200.

Then the most important is about the Rosaria package, it is said in website http://wiki.ros.org/ROSARIA

<lasername>_laserscan (sensor_msgs/LaserScan)
Only published if publish_aria_lasers parameter is true. Provides laser data as a laserscan type. <lasername> will be ARIA's identifier for the laser. May be repeated with different laser names if multiple lasers are configured in ARIA robot parameter file(s).

so the value of publish_aria_lasers has to be set true, thus a launch file can be written like this:

< launch >
< node name="rosaria" pkg="rosaria" type="RosAria" args="_port:=/dev/ttyUSB0" >
< param name="publish_aria_lasers" value="true"/ >
< /node >
< /launch >

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-03-21 06:44:06 -0500

Seen: 446 times

Last updated: Jun 01 '18