You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Neptus expects 2 types of messages from a vehicle to ensure the plans it has are correct.
First is the PlanDBInformation. This is a simple ack of a received plan.
The second is the PlanDBState. This includes PlanDBInformations in it for every plan the vehicle knows about, with their MD5 hashes. The hashes are calculated for the PlanDBSpecification message that was previously received (it has maneuvers and such in it, we send a PlanDBInformation when we first receive it).
As it is, the MD5 hashes are easier to calculate in the bridge, since the cpp IMC library already has the serialization method we need. So right now when a PlanDB message is received, if its arg is of type PlanDBSpecification, the MD5 is calculated and passed into ROS. The rest of the system just echoes that same MD5 back to the bridge when it sends the PlanDBState message.
If the MD5s that Neptus calcualtes and the MD5 it receives in the PlanDBState message do not match, Neptus considers the plan in the vehicle out of synch and warns the user when a plan is started. The source of the warning can be found by grep -r "not synch" in Neptus source.
HOWEVER, our MD5s do not match with Neptus's. I am out of ideas and am giving up on it.
Here are some useful things to look at for any future souls that may attempt to fix this problem:
Neptus expects 2 types of messages from a vehicle to ensure the plans it has are correct.
First is the PlanDBInformation. This is a simple ack of a received plan.
The second is the PlanDBState. This includes PlanDBInformations in it for every plan the vehicle knows about, with their MD5 hashes. The hashes are calculated for the PlanDBSpecification message that was previously received (it has maneuvers and such in it, we send a PlanDBInformation when we first receive it).
As it is, the MD5 hashes are easier to calculate in the bridge, since the cpp IMC library already has the serialization method we need. So right now when a PlanDB message is received, if its arg is of type PlanDBSpecification, the MD5 is calculated and passed into ROS. The rest of the system just echoes that same MD5 back to the bridge when it sends the PlanDBState message.
If the MD5s that Neptus calcualtes and the MD5 it receives in the PlanDBState message do not match, Neptus considers the plan in the vehicle out of synch and warns the user when a plan is started. The source of the warning can be found by
grep -r "not synch"
in Neptus source.HOWEVER, our MD5s do not match with Neptus's. I am out of ideas and am giving up on it.
Here are some useful things to look at for any future souls that may attempt to fix this problem:
Java implementation of IMC:
https://github.com/LSTS/imcjava/blob/master/src/java/pt/lsts/imc/adapter/VehicleAdapter.java
https://github.com/LSTS/imcjava/blob/9d37d0eed8fe90f72f3a295c562c3fb53f6c7730/src/java/pt/lsts/imc/adapter/PlanDbManager.java#L65
https://github.com/LSTS/imcjava/blob/efed1384cc0cc5bacb8ce8ec7bcd536d19c91c8c/src/pt/lsts/imc/IMCMessage.java#L1592
This was received as a guide from our Porto comrades.
Good luck
The text was updated successfully, but these errors were encountered: