open-rmf / rmf

Root repository for the RMF software
Apache License 2.0
223 stars 58 forks source link

RMF and robot not connecting(fleet adapter) #282

Closed nobeey closed 1 year ago

nobeey commented 1 year ago

Bug report

Required information:

Description of the bug

Hi!

i'm trying to connect a PC and one Lightrover (ubuntuMATE20.04 noetic). When I start the server on the PC and the cliant on Lightrover, the robot is registered. but only the purple marker(robot) is displayed on the RMF screen, I don't see the yellow marker(weypoint?).

~$ ros2 launch test_map test_map_gz.launch.xml server_uri:="ws://localhost:8000/_internal"
[INFO] [launch]: All log files can be found below /home/fsi/.ros/log/2022-12-01-20-11-40-461730-fsi-ThinkPad-E15-Gen-2-74289
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [rmf_traffic_schedule-1]: process started with pid [74291]
[INFO] [rmf_traffic_schedule_monitor-2]: process started with pid [74293]
[INFO] [rmf_traffic_blockade-3]: process started with pid [74295]
[INFO] [building_map_server-4]: process started with pid [74297]
[INFO] [schedule_visualizer-5]: process started with pid [74299]
[INFO] [rmf_visualization_fleet_states-6]: process started with pid [74301]
[INFO] [rmf_visualization_building_systems-7]: process started with pid [74303]
[INFO] [rviz2-8]: process started with pid [74305]
[INFO] [door_supervisor-9]: process started with pid [74307]
[INFO] [lift_supervisor-10]: process started with pid [74309]
[INFO] [rmf_task_dispatcher-11]: process started with pid [74311]
[INFO] [simple_api_server-12]: process started with pid [74313]
[INFO] [full_control-13]: process started with pid [74315]
[INFO] [robot_state_aggregator-14]: process started with pid [74317]
[INFO] [free_fleet_server_ros2-15]: process started with pid [74320]
[rmf_traffic_schedule-1] [INFO] [1669893101.265729219] [rmf_traffic_schedule_primary]: Successfully loaded logfile .rmf_schedule_node.yaml 
[rmf_traffic_schedule-1] [INFO] [1669893101.267959998] [rmf_traffic_schedule_primary]: Set up heartbeat on /rmf_traffic/heartbeat with liveliness lease duration of 1000 ms and deadline of 1000 ms
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.268977672] [rmf_traffic_schedule_backup]: Set up heartbeat listener on /rmf_traffic/heartbeat with liveliness lease duration of 1000 ms
[rmf_traffic_blockade-3] [INFO] [1669893101.273740122] [rmf_traffic_blockade_node]: Beginning traffic blockade node
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.276074945] [rmf_traffic_schedule_backup]: Liveliness changed event:
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.276678794] [rmf_traffic_schedule_backup]:   alive_count: 1
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.277061826] [rmf_traffic_schedule_backup]:   not_alive_count: 0
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.277365069] [rmf_traffic_schedule_backup]:   alive_count_change: 1
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.277666691] [rmf_traffic_schedule_backup]:   not_alive_count_change: 0
[rmf_task_dispatcher-11] ~Initializing Dispatcher Node~
[rmf_traffic_schedule-1] [INFO] [1669893101.285247889] [rmf_traffic_schedule_primary]: Beginning traffic schedule node
[free_fleet_server_ros2-15] Greetings from free_fleet_server_ros2
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.290870422] [rmf_traffic_schedule_backup]: Handling new sync of 0 queries from primary node
[rmf_task_dispatcher-11] [INFO] [1669893101.292698053] [rmf_dispatcher_node]:  Declared Time Window Param as: 2.000000 secs
[rmf_task_dispatcher-11] [INFO] [1669893101.292840686] [rmf_dispatcher_node]:  Declared Terminated Tasks Max Size Param as: 100
[rmf_task_dispatcher-11] [INFO] [1669893101.292880249] [rmf_dispatcher_node]:  Declared publish_active_tasks_period as: 2 secs
[rmf_task_dispatcher-11] [INFO] [1669893101.292920471] [rmf_dispatcher_node]:  Use timestamp with task_id: false
[free_fleet_server_ros2-15] ROS 2 SERVER CONFIGURATION
[free_fleet_server_ros2-15]   fleet name: lightrover
[free_fleet_server_ros2-15]   update state frequency: 20.0
[free_fleet_server_ros2-15]   publish state frequency: 2.0
[free_fleet_server_ros2-15]   TOPICS
[free_fleet_server_ros2-15]     fleet state: fleet_states
[free_fleet_server_ros2-15]     mode request: robot_mode_requests
[free_fleet_server_ros2-15]     path request: robot_path_requests
[free_fleet_server_ros2-15]     destination request: robot_destination_requests
[free_fleet_server_ros2-15] SERVER-CLIENT DDS CONFIGURATION
[free_fleet_server_ros2-15]   dds domain: 42
[free_fleet_server_ros2-15]   TOPICS
[free_fleet_server_ros2-15]     robot state: robot_state
[free_fleet_server_ros2-15]     mode request: mode_request
[free_fleet_server_ros2-15]     path request: path_request
[free_fleet_server_ros2-15]     destination request: destination_request
[free_fleet_server_ros2-15] COORDINATE TRANSFORMATION
[free_fleet_server_ros2-15]   translation x (meters): 0.000
[free_fleet_server_ros2-15]   translation y (meters): 0.000
[free_fleet_server_ros2-15]   rotation (radians): 0.000
[free_fleet_server_ros2-15]   scale: 1.000
[rmf_traffic_schedule-1] [INFO] [1669893101.300760651] [rmf_traffic_schedule_primary]: Registered new query [1]
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.301796476] [rmf_traffic_schedule_backup]: Handling new sync of 1 queries from primary node
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.302734077] [rmf_traffic_schedule_backup]: Got mirror for monitor node
[rmf_task_dispatcher-11] [INFO] [1669893101.308794866] [rmf_dispatcher_node]: Starting task dispatcher node
[rmf_traffic_schedule-1] [INFO] [1669893101.347413216] [rmf_traffic_schedule_primary]: A new mirror is tracking query ID [1]
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.348105843] [rmf_traffic_schedule_backup]: Handling new sync of 1 queries from primary node
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.348556876] [rmf_traffic_schedule_backup]: Mirror handling new sync of 1 queries from schedule node version [0]
[full_control-13] [INFO] [1669893101.374934909] [lightrover_fleet_adapter]: Parameter [discovery_timeout] set to: 60.000000
[schedule_visualizer-5] [INFO] [1669893101.380753844] [rmf_visualization_schedule_data_node]: rmf_visualization_schedule_data_node started...
[rmf_visualization_fleet_states-6] [INFO] [1669893101.382731233] [fleet_state_visualizer]: hello i am fleet state visualizer
[schedule_visualizer-5] [INFO] [1669893101.383330544] [rmf_visualization_schedule_data_node]: Websocket server started on port: 8006
[rmf_traffic_schedule-1] [INFO] [1669893101.395085748] [rmf_traffic_schedule_primary]: A new mirror is tracking query ID [1]
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.395963247] [rmf_traffic_schedule_backup]: Handling new sync of 1 queries from primary node
[rmf_traffic_schedule_monitor-2] [INFO] [1669893101.396243312] [rmf_traffic_schedule_backup]: Mirror handling new sync of 1 queries from schedule node version [0]
[schedule_visualizer-5] [INFO] [1669893101.397445967] [rmf_visualization_schedule_data_node]: Mirror handling new sync of 1 queries from schedule node version [0]
[schedule_visualizer-5] [INFO] [1669893101.397811489] [rmf_visualization_schedule_data_node]: Mirror handling new sync of 1 queries from schedule node version [0]
[full_control-13] [INFO] [1669893101.425349292] [lightrover_fleet_adapter]: Parameter [linear_velocity] set to: 0.220000
[full_control-13] [INFO] [1669893101.425645065] [lightrover_fleet_adapter]: Parameter [angular_velocity] set to: 1.000000
[full_control-13] [INFO] [1669893101.425908586] [lightrover_fleet_adapter]: Parameter [linear_acceleration] set to: 2.500000
[full_control-13] [INFO] [1669893101.426206126] [lightrover_fleet_adapter]: Parameter [angular_acceleration] set to: 3.200000
[full_control-13] [INFO] [1669893101.426511548] [lightrover_fleet_adapter]: Parameter [footprint_radius] set to: 0.300000
[full_control-13] [INFO] [1669893101.426799966] [lightrover_fleet_adapter]: Parameter [vicinity_radius] set to: 0.500000
[full_control-13] [INFO] [1669893101.427106034] [lightrover_fleet_adapter]: Parameter [reversible] set to: 0
[full_control-13]  ===== We have an irreversible robot
[full_control-13] terminate called after throwing an instance of 'YAML::BadFile'
[full_control-13]   what():  bad file
[rviz2-8] [INFO] [1669893101.511645512] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-8] [INFO] [1669893101.512491260] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rmf_visualization_building_systems-7] [INFO] [1669893101.531189016] [building_systems_visualizer]: Building systems visualizer started...
[rviz2-8] [INFO] [1669893101.533763170] [rviz2]: Stereo is NOT SUPPORTED
[ERROR] [full_control-13]: process has died [pid 74315, exit code -6, cmd '/home/fsi/rmf_ws/install/rmf_fleet_adapter/lib/rmf_fleet_adapter/full_control --ros-args -r __node:=lightrover_fleet_adapter --params-file /tmp/launch_params_3_n8ms3e --params-file /tmp/launch_params_4_h1ywra --params-file /tmp/launch_params_flwz5hy2 --params-file /tmp/launch_params_6mqn3nan --params-file /tmp/launch_params_yyr502qp --params-file /tmp/launch_params_tqwyo2hm --params-file /tmp/launch_params_nyz_fpfi --params-file /tmp/launch_params_l1lgv_29 --params-file /tmp/launch_params_ibegebf_ --params-file /tmp/launch_params_6la40fis --params-file /tmp/launch_params_i15s5b3y --params-file /tmp/launch_params_npoiyrzz --params-file /tmp/launch_params_u2iygczy --params-file /tmp/launch_params_226lzlav --params-file /tmp/launch_params_id722rtp --params-file /tmp/launch_params_amtfx6da --params-file /tmp/launch_params_9aer2kun --params-file /tmp/launch_params_976_tn_j --params-file /tmp/launch_params_k_rvuhtj --params-file /tmp/launch_params_jac77oh7 --params-file /tmp/launch_params_mnuz9c4s --params-file /tmp/launch_params_z2g3_0w5 --params-file /tmp/launch_params_zydyj64f --params-file /tmp/launch_params_hlz9no27 --params-file /tmp/launch_params_1310yonz --params-file /tmp/launch_params_bioz3ln9 --params-file /tmp/launch_params_9lpdtkw2 --params-file /tmp/launch_params_i3now5pc --params-file /tmp/launch_params_tyexagiq --params-file /tmp/launch_params_20cdrwbn --params-file /tmp/launch_params_bgfb9oey'].
[simple_api_server-12] Set Server IP to: 0.0.0.0
[simple_api_server-12] Set Server port to: 0.0.0.0:8083
[simple_api_server-12] Set RMF Websocket port to: localhost:7878
[simple_api_server-12] Starting Websocket Server
[simple_api_server-12] Starting RMF_Demos API Server: 0.0.0.0:8083, with ws://localhost:7878
[simple_api_server-12]  * Serving Flask app "rmf_demos_panel.simple_api_server" (lazy loading)
[simple_api_server-12]  * Environment: production
[simple_api_server-12]    WARNING: This is a development server. Do not use it in a production deployment.
[simple_api_server-12]    Use a production WSGI server instead.
[simple_api_server-12]  * Debug mode: off
[schedule_visualizer-5] [INFO] [1669893101.653681112] [rmf_visualization_schedule_marker_publisher]: Rviz parameters updated
[building_map_server-4] [INFO] [1669893101.851529893] [building_map_server]: loading map path: /home/fsi/rmf_ws/install/test_map/share/test_map/maps/map_test/map_test.building.yaml
[building_map_server-4] [INFO] [1669893101.854119080] [building_map_server]: opening: /home/fsi/rmf_ws/install/test_map/share/test_map/maps/map_test/../map_test.png
[building_map_server-4] [INFO] [1669893101.855704132] [building_map_server]: read 21735 byte image
[building_map_server-4] [INFO] [1669893101.856166834] [building_map_server]: unable to generate GeoJSON for this map.
[building_map_server-4] [INFO] [1669893101.858861576] [building_map_server]: publishing map...
[building_map_server-4] [INFO] [1669893101.859408512] [building_map_server]: ready to serve map: "map_test"  Ctrl+C to exit...
[schedule_visualizer-5] [INFO] [1669893101.860028315] [rmf_visualization_schedule_marker_publisher]: Received map "map_test" containing 1 level(s)
[schedule_visualizer-5] [INFO] [1669893101.860137170] [rmf_visualization_schedule_marker_publisher]: Level cache updated
[schedule_visualizer-5] [INFO] [1669893101.860294718] [rmf_visualization_schedule_marker_publisher]: Loading floorplan Image:  png
[rviz2-8] [INFO] [1669893102.000553066] [rviz2]: Trying to create a map of size 1984 x 1984 using 1 swatches
[rviz2-8] [ERROR] [1669893102.029468521] [rviz2]: Vertex Program:rviz/glsl120/indexed_8bit_image.vert Fragment Program:rviz/glsl120/indexed_8bit_image.frag GLSL link result : 
[rviz2-8] active samplers with a different type refer to the same texture image unit
[free_fleet_server_ros2-15] [INFO] [1669893102.200065645] [lightrover_fleet_server_node]: registered a new robot: [lightrover1]
[schedule_visualizer-5] [INFO] [1669893150.549818650] [rmf_visualization_schedule_data_node]: [TrajectoryServer] Connected with a client
[schedule_visualizer-5] [2022-12-01 20:23:15] [error] handle_read_frame error: websocketpp.transport:7 (End of File)
[schedule_visualizer-5] [INFO] [1669893795.464477378] [rmf_visualization_schedule_data_node]: [TrajectoryServer] Disconnected with a client
[schedule_visualizer-5] [INFO] [1669894185.063151485] [rmf_visualization_schedule_data_node]: [TrajectoryServer] Connected with a client

>[full_control-13]  ===== We have an irreversible robot
>[full_control-13] terminate called after throwing an instance of 'YAML::BadFile'
>[full_control-13]   what():  bad file

i think there is a problem with this part, but I don't know how to solve it

Steps to reproduce the bug

it occurs when connecting Lightrover and RMF

Expected behavior

RMF screen shows purple marker and yellow marker.

Actual behavior

only a purple marker appears.

Screenshots

Screenshot from 2022-12-01 23-11-19

Additional information

aaronchongth commented 1 year ago

hello @nobeey, please edit your post so that the logs are either in a gist or in a

code block

It looks like a badly formatted file was provided for the fleet adapter, or that the file is not available. Are you able to share what the file looks like?

nobeey commented 1 year ago

hi! @aaronchongth, thanks for replying.

I shared it with gist, but how about this? if this is not the case please let me know. I'm inexperienced, so sorry if I'm wrong.

aaronchongth commented 1 year ago

@nobeey I've edited your original post at the top to use a code block. In the future, sharing it logs should be in a gist, as you have shared your launch file, while the shorter logs or code snippets can be shared as a code block.

As for the error, it looks like the only yaml file that will be read by the fleet adapter is nav_graph_file, could you share how you are launching this particular launch file? My hunch is that the launch argument nav_graph_file could be pointing to the wrong location.

nobeey commented 1 year ago

hello @aaronchongth,

My hunch is that the launch argument nav_graph_file could be pointing to the wrong location.

It was caused by the argument nav_graph_file for this file was pointing to the wrong location. The folder contained only 1.yaml but pointed to 0.yaml. editing the launch file and rebuilding, the yellow marker now appeares.

Screenshot from 2022-12-02 19-47-22

Here is the log when I run this.

Thanks a lot for the help