roslaunch ignoring set parameters for sicktoolbox_wrapper package
I am setting a few parameters in my launch file. I can verify my parameters have been set correctly based on the terminal output. However, when roslaunch attempts to start the node, it ignores the set parameters. How do I fix this? kindly see below for details.
The parameters are correct and everything works when I use rosrun
.
I am using a Lenovo laptop (W530) with Ubuntu 14.04. ROS distribution is Indigo which I installed with apt-get.
the launch file looks like this:
<launch>
<!--define the serial port for the PC to LMS comm in parameter server-->
<param
name="sicklms/port"
value="/dev/ttyUSB0">
</param>
<!--define the lms comm baud rate in parameter server-->
<param
name="sicklms/baud"
value="500000">
</param>
<!--launch the sicktoolbox_wrapper node. -->
<node
pkg="sicktoolbox_wrapper"
type="sicklms"
name="sick_lms_scan_publisher"
output="screen">
</node>
</launch>
The terminal message when I run the roslauch command looks like this:
constructor@constructor-pc:~/Desktop/workspace$ roslaunch j_robot_state_publisher jimmy_state_publisher.launch
... logging to /home/constructor/.ros/log/4d83f6e0-c8c8-11e7-9df6-e09d3128cfa4/roslaunch-constructor-pc-11263.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://constructor-pc:38491/
SUMMARY
========
PARAMETERS
* /robot_description: <?xml version="1....
* /rosdistro: indigo
* /rosversion: 1.11.21
* /sicklms/baud: 500000
* /sicklms/port: /dev/ttyUSB0
NODES
/
jimmy_state_publisher (j_robot_state_publisher/jimmy_state_publisher)
node_publishing_enc_data (j_lms_enc_pos_publisher/publish_lms_enc_pos)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
rviz (rviz/rviz)
sick_lms_scan_publisher (sicktoolbox_wrapper/sicklms)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[node_publishing_enc_data-1]: started with pid [11282]
process[robot_state_publisher-2]: started with pid [11283]
process[jimmy_state_publisher-3]: started with pid [11284]
process[sick_lms_scan_publisher-4]: started with pid [11292]
process[rviz-5]: started with pid [11308]
*** Attempting to initialize the Sick LMS...
Attempting to open device @ /dev/lms200
ERROR: I/O exception - SickLMS2xx::_setupConnection: - Unable to open serial port
ERROR: I/O exception - SickLMS2xx::_setupConnection: - Unable to open serial port
[ERROR] [1510615504.630421790]: Initialize failed! are you using the correct device path?
[ INFO] [1510615504.715419546]: rviz version 1.11.18
[ INFO] [1510615504.715525284]: compiled against Qt version 4.8.6
[ INFO] [1510615504.715558080]: compiled against OGRE version 1.8.1 (Byatis)
[sick_lms_scan_publisher-4] process has died [pid 11292, exit code 2, cmd /home/constructor/Desktop /workspace/devel/lib/sicktoolbox_wrapper/sicklms __name:=sick_lms_scan_publisher __log:=/home/constructor/.ros/log/4d83f6e0-c8c8-11e7-9df6-e09d3128cfa4/sick_lms_scan_publisher-4.log].log file: /home/constructor/.ros/log/4d83f6e0-c8c8-11e7-9df6-e09d3128cfa4/sick_lms_scan_publisher-4*.log
[ INFO] [1510615505.088206168]: Stereo is NOT SUPPORTED
[ INFO] [1510615505.088408404]: OpenGl version: 4.4 (GLSL 4.4).
You can see that the sicklms/port: /dev/ttyUSB0
is set correctly, and just a few lines down the code tries to use the wrong parameter (Attempting to open device @ /dev/lms200
)
I tried:
- starting up roscore, and then manually setting the parameter using
rosparam set sicklms/port /dev/ttyUSB0
. Then I confirmed it usingsickparam get /sicklms/port
and it is indeed /dev/ttyUSB0. Then I try roslauch again, and I get the same exact error. - I tried to start the node manually using
rosrun sicktoolbox_wrapper sicklms
and the node starts up fine. - Originally the launch file code was kept in a ...
Can you please copy and paste the terminal output to your question? Images aren't searchable and pastebins can disappear.