Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wolf_ros_laser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_ros
wolf_ros_laser
Commits
b5f661b8
Commit
b5f661b8
authored
4 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
hotfix: Extrinsics were already taken into account...!
parent
2e4d559e
No related branches found
No related tags found
2 merge requests
!4
new release
,
!3
New release
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/publisher_laser_map.cpp
+2
-8
2 additions, 8 deletions
src/publisher_laser_map.cpp
with
2 additions
and
8 deletions
src/publisher_laser_map.cpp
+
2
−
8
View file @
b5f661b8
...
...
@@ -256,14 +256,8 @@ bool PublisherLaserMap::updateOccMap()
void
PublisherLaserMap
::
addScanToOccMap
(
const
ScanData
&
scan_data
,
const
Eigen
::
Vector3d
&
pose
)
{
// Get laser extrinsics
Eigen
::
Vector3d
laser_pose
;
laser_pose
.
head
<
2
>
()
=
Eigen
::
Rotation2Dd
(
pose
(
2
)).
matrix
()
*
scan_data
.
capture_
->
getSensor
()
->
getP
()
->
getState
()
+
pose
.
head
<
2
>
();
laser_pose
(
2
)
=
scan_data
.
capture_
->
getSensor
()
->
getO
()
->
getState
()(
0
)
+
pose
(
2
);
// Compute global points
Eigen
::
MatrixXf
points
=
Eigen
::
Rotation2Df
(
laser_
pose
(
2
)).
matrix
()
*
scan_data
.
local_points_
+
laser_
pose
.
cast
<
float
>
().
head
(
2
).
replicate
(
1
,
scan_data
.
local_points_
.
cols
());
Eigen
::
MatrixXf
points
=
Eigen
::
Rotation2Df
(
pose
(
2
)).
matrix
()
*
scan_data
.
local_points_
+
pose
.
cast
<
float
>
().
head
(
2
).
replicate
(
1
,
scan_data
.
local_points_
.
cols
());
// Bounds
Eigen
::
Vector2i
min_cell
=
vectorToCell
(
Eigen
::
Vector2d
(
points
.
row
(
0
).
minCoeff
(),
...
...
@@ -288,7 +282,7 @@ void PublisherLaserMap::addScanToOccMap(const ScanData& scan_data, const Eigen::
}
// Apply log odds for each ray
Eigen
::
Vector2i
origin_cell
=
vectorToCell
(
laser_
pose
.
head
<
2
>
());
Eigen
::
Vector2i
origin_cell
=
vectorToCell
(
pose
.
head
<
2
>
());
Eigen
::
Vector2i
point_cell
;
for
(
auto
i
=
0
;
i
<
points
.
cols
();
i
++
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment