Commission.json not found in schema dictionary error (#453)

Posted by @cwrx777:

Hi,

what could be causing this error?
I’m using rmf.repos from main branch.

url: https://raw.githubusercontent.com/open-rmf/rmf_api_msgs/main/rmf_api_msgs/schemas/commission.json not found in schema dictionary. Status for robot [WardRobot_102] will not be overwritten.
Encountered error: invalid JSON-type for a schema for https://raw.githubusercontent.com/open-rmf/rmf_api_msgs/main/rmf_api_msgs/schemas/commission.json # , expected: boolean or object. Please ensure the override status is a valid string as per the robot_state.json schema. The status for robot [WardRobot_102] will not over overwritten.

Posted by @mxgrey:

Which node or program is producing this error?

Posted by @cwrx777:

Hi @mxgrey, it’s fleet adapter.


Edited by @cwrx777 at 2024-04-19T21:59:28Z

Posted by @mxgrey:

Are you confident that you’ve built rmf_ros2 from the main branch?

I would suggest double checking that rmf_ros2 is on main and then doing a completely fresh build of the workspace. This error is something I would expect if an old version of rmf_ros2 is built against a new version of rmf_api_msgs.

Posted by @mxgrey:

@cwrx777 I looked more into this and realized that the issue you’re reporting will happen when using all the latest humble or iron branches together, which of course was an accident. I’ve patched the humble branch so maybe pull again and give it another try.

Posted by @rmj1405:

Hi! I just created a fresh installation of ros2, rmf(all the packages in rmf.repos) and my fleet adapter. I am facing the same issues as @cwrx777 although the rmf_api_msgs includes the same changes made by @mxgrey that were backported into the humble branch so is it right to say that I don’t need to pull from the humble branch?. I’m not sure how to solve this, any guidance would be much appreciated!

My config: ROS2 Humble, Ubuntu 22.04
My errors logs when launching fleet_adapter_ecobot:

[ERROR] [1715070242.466528852] [ecobot_fleet_adapter]: url: https://raw.githubusercontent.com/open-rmf/rmf_api_msgs/main/rmf_api_msgs/schemas/commission.json not found in schema dictionary. Status for robot [ecobot40_1] will not be overwritten.
[ERROR] [1715070242.467778635] [ecobot_fleet_adapter]: Encountered error: invalid JSON-type for a schema for https://raw.githubusercontent.com/open-rmf/rmf_api_msgs/main/rmf_api_msgs/schemas/commission.json # , expected: boolean or object. Please ensure the override status is a valid string as per the robot_state.json schema. The status for robot [ecobot40_1] will not over overwritten.

Posted by @mxgrey:

I recently noticed the cause of this problem and it’s fixed in this PR: Fix schema dictionary used during robot status override by mxgrey · Pull Request #349 · open-rmf/rmf_ros2 · GitHub

I’ll be merging this into main later today and then backporting to humble and iron immediately afterwards.

Posted by @rmj1405:

Alright will check back tmr! Thank you so much