ERROR: Unable to communicate with service [/write_state]
-
电脑系统是 ubuntu18.04 [amd64:bionic],ROS 版本是 melodic。自己在通过运行
roslaunch cartographer_ros offline_backpack_2d.launch bag_filenames:=/home/gene/project/rosbag/download/b2-2014-12-17-14-53-26.bag
启动 2d carto建图,可以正常运行。但当自己另起终端运行rosservice call /finish_trajectory 0
,carto 2d launch 终端会停止运行且出现“红字”:[cartographer_offline_node-4] process has died [pid 9338, exit code -6, cmd /home/gene/project/01_xcmg_slam/carto_ws/install_isolated/lib/cartographer_ros/cartographer_offline_node -configuration_directory /home/gene/project/01_xcmg_slam/carto_ws/install_isolated/share/cartographer_ros/configuration_files -configuration_basenames backpack_2d.lua -urdf_filenames /home/gene/project/01_xcmg_slam/carto_ws/install_isolated/share/cartographer_ros/urdf/backpack_2d.urdf -bag_filenames /home/gene/project/rosbag/download/b2-2014-12-17-14-53-26.bag
自己运行
rosservice call /finish_trajectory 0
命令时会出现如下error:ERROR: Unable to communicate with service [/write_state], address [rosrpc://gene:44377]
具体实际运行如截图所示:
还请大佬指点指点,非常感谢! -
补充: 截图貌似整体太模糊,具体内容如下所示:
-
@Gene 第一次红字的时候,节点就挂了,
再次调用自然是无法通信了.
@Gene 在 ERROR: Unable to communicate with service [/write_state] 中说:
ERROR: Unable to communicate with service [/write_state], address [rosrpc://gene:44377]
看终端报错应该是数组越界,具体要debug代码才能找到原因