Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix parameter passing bug of first link to other robots #23

Merged
merged 1 commit into from
Sep 17, 2020
Merged

fix parameter passing bug of first link to other robots #23

merged 1 commit into from
Sep 17, 2020

Conversation

SunZezhou
Copy link
Contributor

LinkScans in Mapper.cpp is
void MapperGraph::LinkScans(LocalizedRangeScan* pFromScan, LocalizedRangeScan* pToScan, const Pose2& rMean, const Matrix3& rCovariance)

but line 1198 in Mapper.cpp reversed the pscan and pSensorManager->GetScan(rCandidateSensorName, 0) parameters.

The correct order should be as shown on line 1171.

fix parameter passing bug of first link to other robots.
@mikeferguson
Copy link
Member

How have you tested this? What exactly does it change at runtime? (it seems strange to me that a bug like this could exist so long)

@SunZezhou
Copy link
Contributor Author

Yes, I have tested it with multi-robot environment.

As shown in Fig.1, pSensorManager->GetScan(rCandidateSensorName, 0) is robot_2 with position (x=3,y=0), pScan is robot_1 with position (x=0, y=0).

When step into LinkScans function (Fig. 2), two same position pFromScan->GetSensorPose()and rMean are passed into LinkInfo function.

And the wrong result after execute CorrectPoses() function is shown in Fig. 3.

The corrected process are shown in Fig. 4-6.

img1
img2
img3
img4
img5
img6

@mikeferguson mikeferguson merged commit 3a39610 into ros-perception:melodic-devel Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants