[Problem Description]
This problem occurs using a multi-machine communication process, although the upper and lower computer can be connected, but there is / odom topic release, but a series of mistakes in the next map building process, so I checked tf_tree, saw these error.
PluginHandlerDirect._restore_settings() plugin "rqt_tf_tree/RosTfTree#0" raised an exception:
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/qt_gui/plugin_handler_direct.py", line 116, in _restore_settings
self._plugin.restore_settings(plugin_settings_plugin, instance_settings_plugin)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_tf_tree/tf_tree.py", line 131, in restore_settings
self._refresh_tf_graph()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_tf_tree/tf_tree.py", line 143, in _refresh_tf_graph
self._update_graph_view(self._generate_dotcode())
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_tf_tree/tf_tree.py", line 152, in _generate_dotcode
force_refresh=force_refresh)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_tf_tree/dotcode_tf.py", line 96, in generate_dotcode
data = yaml_parser.load(yaml_data)
File "/usr/local/lib/python2.7/dist-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/usr/local/lib/python2.7/dist-packages/yaml/constructor.py", line 66, in get_single_data
node = self.get_single_node()
File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/usr/local/lib/python2.7/dist-packages/yaml/composer.py", line 58, in compose_document
self.get_event()
File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 118, in get_event
self.current_event = self.state()
File "/usr/local/lib/python2.7/dist-packages/yaml/parser.py", line 193, in parse_document_end
token = self.peek_token()
File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 129, in peek_token
self.fetch_more_tokens()
File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 223, in fetch_more_tokens
return self.fetch_value()
File "/usr/local/lib/python2.7/dist-packages/yaml/scanner.py", line 579, in fetch_value
self.get_mark())
ScannerError: mapping values are not allowed here
in "<string>", line 2, column 32:
=== Robot drivetrain parameters:
【problem solved】
Speculation is not because there are two conflicting tf conversion
No exact cause, but I put the next crew of /ros_arduino_bridge/ros_arduino_python/config/my_arduino_params.yaml tune into and PC in exactly the same results can be normal, surprise!
And SLAM can also map a normal build ~
so just guess there are two conflicting tf conversion, you may wish to try.
I also attach the my_arduino_params.yaml, we can help look at this problem in the end went wrong
# For a direct USB cable connection, the port name is typically
# /dev/ttyACM# where is # is a number such as 0, 1, 2, etc
# For a wireless connection like XBee, the port is typically
# /dev/ttyUSB# where # is a number such as 0, 1, 2, etc.
port: /dev/ttyACM0 #你要修改的部分,改为arduino板和上位机连接的串口号
baud: 57600
timeout: 0.1
rate: 50
sensorstate_rate: 10
use_base_controller: True #你要修改的部分 改为True
base_controller_rate: 10
# For a robot that uses base_footprint, change base_frame to base_footprint
base_frame: base_link
# === 这部分是车子的参数,比如轮子直径,减速比,编码器信息等,根据你自己的车子来修改
wheel_diameter: 0.065 #你要修改的部分
wheel_track: 0.125 #你要修改的部分
encoder_resolution: 8384 #你要修改的部分
gear_reduction: 1.0 #你要修改的部分
motors_reversed: False #你要修改的部分
# === PID 部分,控制轮速,修改到车子能够根据命令走直线且速度稳定
Kp: 10 #你要修改的部分
Kd: 12 #你要修改的部分
Ki: 0 #你要修改的部分
Ko: 50 #你要修改的部分
accel_limit: 1.0 #你要修改的部分
# === Sensor definitions. Examples only - edit for your robot.
# Sensor type can be one of the follow (case sensitive!):
# * Ping
# * GP2D12
# * Analog
# * Digital
# * PololuMotorCurrent
# * PhidgetsVoltage
# * PhidgetsCurrent (20 Amp, DC)
sensors: {
#motor_current_left: {pin: 0, type: PololuMotorCurrent, rate: 5},
#motor_current_right: {pin: 1, type: PololuMotorCurrent, rate: 5},
#ir_front_center: {pin: 2, type: GP2D12, rate: 10},
#sonar_front_center: {pin: 5, type: Ping, rate: 10},
arduino_led: {pin: 13, type: Digital, rate: 5, direction: output}
}