-
Notifications
You must be signed in to change notification settings - Fork 965
Open
Description
Hi!
I am porting our software stack from ROS1 to ROS2 and confused about the implementation of use_manual_datum in navsat_transform.cpp. I used to set wait_for_datum parameter to True and call set datum service when I'm okay with the position & covariance of my robot (ROS Noetic). In new implementation, navsat_transform_node sets datum before I call set datum service.
In perodic callback:
void NavSatTransform::transformCallback()
{
if (!transform_good_) {
computeTransform();
if (transform_good_ && !use_odometry_yaw_ && !use_manual_datum_) {
// Once we have the transform, we don't need the IMU
imu_sub_.reset();
}
After it goes into computeTransform it sets its manual datum by itself.
void NavSatTransform::computeTransform()
{
// When using manual datum, wait for the receive of odometry message so
// that the base frame and world frame names can be set before
// the manual datum pose is set. This must be done prior to the transform computation.
if (!transform_good_ && has_transform_odom_ && use_manual_datum_) {
setManualDatum();
}
// Only do this if:
// 1. We haven't computed the odom_frame->cartesian_frame transform before
// 2. We've received the data we need
if (!transform_good_ && has_transform_odom_ && has_transform_gps_ &&
has_transform_imu_)
...
I could not get the implementation reason of setManualDatum in here.
if (!transform_good_ && has_transform_odom_ && use_manual_datum_) {
setManualDatum();
}
Metadata
Metadata
Assignees
Labels
No labels