Monash-Connected-Autonomous-Vehicle / ESDA

Software stack for MCAVs annual IGVC entry
0 stars 0 forks source link

Create datum setter node for robot_localization launch #28

Closed AbBaSaMo closed 4 months ago

AbBaSaMo commented 4 months ago

When the pkg is launched, we need to set the datum via a service. So we'll need a node that reads gps values and calls this service ONCE and in ENU standard where a 0 heading is east

Image

Originally posted by @AbBaSaMo in #19

AbBaSaMo commented 4 months ago

SetDatum is a service defined in the robot_localization package https://github.com/Monash-Connected-Autonomous-Vehicle/robot_localization/blob/humble-devel/srv/SetDatum.srv

It requires a message of type GeoPose https://docs.ros.org/en/noetic/api/geographic_msgs/html/msg/GeoPose.html which contains the following:

https://answers.ros.org/question/237947/how-do-you-use-the-navsat_transform-set_datum-service/ suggests using 0 0 0 1 minimally for orientation

Will also have to look into the stuff docs mentioned about ensuring imu abides by standards

AbBaSaMo commented 4 months ago

0 0 0 1 orientation means the robot has a neutral orientation with no rotations, so it seems this is why it is suggested as a starting orientation

AbBaSaMo commented 4 months ago

It appears to be working with the set datum as the co-ords of clayton VIC

Image

AbBaSaMo commented 4 months ago

I misread the docs/tutes on robot_loc. It seems if we set the wait_for_datum parameter as false, the package does not require us to set an initial datum. Everything works even when the datum setter node is not running. If the param is true otherwise, we set the datum as an origin point

Image

Will leave the implementation just in case we decide for whatever reason to set this param as true but closing the issue now.