open-rmf / rmf

Root repository for the RMF software
Apache License 2.0
233 stars 60 forks source link

Received invalid sequence number #15

Closed destkk closed 3 years ago

destkk commented 3 years ago

Ubuntu 20.04

Hi there. I have built my own custom map through traffic editor and run the simulation in gazebo. After which I manually sent a srv ros2 service call /submit_task rmf_task_msgs/srv/SubmitTask '{description: {task_type:{type: 1}, loop: {start_name: 'WP7', finish_name: 'start', num_loops: 1}}}' to test it out and it is running fine, just that I am seeing the Unrecognized query_id:2... ignoring.. consistently

May I know what has caused this issue?

[gzserver-14] [INFO] [1617067738.696669978] [slotcar_TinyRobot]: TinyRobot received a path request with 10 waypoints
[rmf_traffic_schedule-1] [WARN] [1617067738.696808633] [rmf_traffic_schedule_node]: [ScheduleNode::mirror_update] Unrecognized query_id: 2
[schedule_visualizer-8] [ERROR] [1617067738.697122625] [rclcpp]: Received invalid sequence number. Ignoring...
[rviz2-4] [ERROR] [1617067738.697654551] [rclcpp]: Received invalid sequence number. Ignoring...
[rmf_traffic_schedule-1] [WARN] [1617067738.744171383] [rmf_traffic_schedule_node]: [ScheduleNode::mirror_update] Unrecognized query_id: 2
[schedule_visualizer-8] [ERROR] [1617067738.744534610] [rclcpp]: Received invalid sequence number. Ignoring...
[rviz2-4] [ERROR] [1617067738.744893355] [rclcpp]: Received invalid sequence number. Ignoring...
mxgrey commented 3 years ago

The only way I know of that these error messages would get produced is if you are running multiple "schedule nodes" (i.e. rmf_traffic_schedule from the rmf_traffic_ros2 package).

As of right now, RMF only supports running on schedule node at a time. Also we haven't finish the fail over mechanism for the schedule node, so unfortunately if your one schedule node closes down, then all the fleet adapters need to be closed down before bringing everything back up.

I've opened a ticket to address these issues: https://github.com/open-rmf/rmf_ros2/issues/19

In the meantime, you'll need to exercise discipline about making sure only one schedule node is running at a time.

destkk commented 3 years ago

The only way I know of that these error messages would get produced is if you are running multiple "schedule nodes" (i.e. rmf_traffic_schedule from the rmf_traffic_ros2 package).

As of right now, RMF only supports running on schedule node at a time. Also we haven't finish the fail over mechanism for the schedule node, so unfortunately if your one schedule node closes down, then all the fleet adapters need to be closed down before bringing everything back up.

I've opened a ticket to address these issues: open-rmf/rmf_ros2#19

In the meantime, you'll need to exercise discipline about making sure only one schedule node is running at a time.

Hi there. How do I check how many schedule nodes are running? I believe there is only one that is running. In what condition it will be running multiple "schedule nodes"? I have only 1 instance running for RMF.

mxgrey commented 3 years ago

Typically the schedule node is included in a "scenario" launch file, like the ones you'll find in rmf_demos. Launching only one scenario at a time and never manually running the schedule node (e.g. $ ros2 run rmf_traffic_ros2 rmf_traffic_schedule) should prevent multiple schedule nodes from being run. If you are on a local network where multiple people may be running RMF scenarios, then you should make sure that each person is using a unique ROS_DOMAIN_ID in their shell environment, otherwise your ROS2 nodes will discover each other and try to mesh into one combined system.

If you're confident that none of what I described above has occurred, then I'm not sure what else could cause the errors and warnings that you've shared with us. If you have a reliable way to reproduce the issue, you could share the instructions with us, and we can try to reproduce on it on our end to debug.