I restarted my robot, running ROS Kinetic on a Raspberry Pi, and I'm finding that the master node is immediately crashing on startup with the error:
auto-starting new master
process[master]: started with pid [7708]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 5dab8662-0754-11e8-a585-b827eb09ee17
process[rosout-1]: started with pid [7721]
started core service [/rosout]
load_parameters: unable to set parameters (last param was [/head_arduino/serial_node/baud=115200]): cannot marshal None unless allow_none is enabled
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 307, in main
p.start()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 279, in start
self.runner.launch()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 654, in launch
self._setup()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 641, in _setup
self._load_parameters()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 338, in _load_parameters
r = param_server_multi()
File "/usr/lib/python2.7/xmlrpclib.py", line 1006, in __call__
return MultiCallIterator(self.__server.system.multicall(marshalled_list))
File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1596, in __request
allow_none=self.__allow_none)
File "/usr/lib/python2.7/xmlrpclib.py", line 1094, in dumps
data = m.dumps(params)
File "/usr/lib/python2.7/xmlrpclib.py", line 638, in dumps
dump(v, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 660, in __dump
f(self, value, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 719, in dump_array
dump(v, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 660, in __dump
f(self, value, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 741, in dump_struct
dump(v, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 660, in __dump
f(self, value, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 719, in dump_array
dump(v, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 660, in __dump
f(self, value, write)
File "/usr/lib/python2.7/xmlrpclib.py", line 664, in dump_nil
raise TypeError, "cannot marshal None unless allow_none is enabled"
TypeError: cannot marshal None unless allow_none is enabled
[rosout-1] killing on exit
[master] killing on exit
Looking in my ~/.ros/latest/latest/roslaunch-rae-8050.log
I also see the lines:
[roslaunch][INFO] '2018-02-01 08:55:26': load_parameters starting ...
[roslaunch][ERROR] '2018-02-01 08:55:26': load_parameters: unable to set parameters (last param was [/head_arduino/serial_node/baud=115200]): cannot marshal None unless allow_none is enabled
What's causing this?
My node /head_arduino/serial_node/baud=115200
is just a stock rosserial serial_node.py
instance launched with:
<launch>
<group ns="head_arduino">
<node pkg="rosserial_python" type="serial_node.py" name="serial_node" output="screen">
<param name="~port" value="/dev/ttyACM0" />
<param name="~baud" value="115200" />
</node>
</group>
</launch>
Clearly, none of its parameters are None
.
Googling the error suggests it's a generic exception thrown by xmlrpclib when an XMLRPC endpoint receives a bad value, but obviously, that could mean anything here. Is this evidence that the Pi wasn't cleanly shutdown and that data was corrupted somewhere, causing bad data to be loaded via the ros parameter server?
How would I fix or purge this bad data? How do I reset the parameter server so it loads the correct parameters from my launch files?
Edit: I was running everything from a single all.launch
file that looks like:
<launch>
<include file="$(find myrobot)/launch/serial_head.launch" />
<include file="$(find myrobot)/launch/serial_torso.launch" />
<include file="$(find myrobot)/launch/raspicam_compressed_320.launch" />
<include file="$(find myrobot)/launch/sound.launch" />
<include file="$(find myrobot)/launch/diagnostics_aggregator.launch" />
<include file="$(find myrobot)/launch/robot_state_publisher.launch" />
...
</launch>
To simply things, I tried running just roscore
and then the launch file for my serial_node.py, and that ran fine. But when I again ran my all.launch
the error re-occurred. Why is this? Does the ROS parameter server cache parameters per parent launch file?
I tried this suggestion to add clear_params="true"
to all my nodes, but that had no effect.
I noticed that the <include>
tag allows supports clear_param
, so I tried that, but that just gives me a different error. It apparently requires the tag's ns
parameter be set, so I changed my include tags to end with clear_param="true" ns="/" />
, but that just made it immediately fail with the error:
Failed to clear parameter: parameter [/] is not set
Originally posted by Cerin on ROS Answers with karma: 940 on 2018-02-01
Post score: 1