Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
crosbot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Crosbot
crosbot
Commits
a230a4f4
Commit
a230a4f4
authored
8 years ago
by
Timothy Wiley
Browse files
Options
Downloads
Patches
Plain Diff
crosbot_fastslam: deprecate un-used function, and more code cleanup
parent
d54b6552
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
crosbot_fastslam/include/crosbot_fastslam/heightmap.hpp
+12
-6
12 additions, 6 deletions
crosbot_fastslam/include/crosbot_fastslam/heightmap.hpp
with
12 additions
and
6 deletions
crosbot_fastslam/include/crosbot_fastslam/heightmap.hpp
+
12
−
6
View file @
a230a4f4
...
...
@@ -138,7 +138,7 @@ public:
// checks if a location is in this patch
// NOTE: this function isn't currently used since it's more efficient not to make invalid calls
// This means it hasn't been tested in use
inline
bool
checkWithinMap
(
float
x
,
float
y
)
{
inline
bool
checkWithinMap
(
float
x
,
float
y
)
__attribute__
((
deprecated
))
{
if
((
x
<
xOrig
)
||
(
x
>=
(
xOrig
+
width
))
||
(
y
<
yOrig
)
||
(
y
>=
(
yOrig
+
height
)))
{
return
false
;
}
...
...
@@ -163,7 +163,8 @@ class HeightMultiMap : public HandledObject {
public:
struct
SearchConstraints
{
public:
double
maxDist
,
fov
;
double
maxDist
;
double
fov
;
Pose2D
sensor
;
SearchConstraints
()
:
maxDist
(
-
1
),
fov
(
0
),
sensor
(
NAN
,
NAN
,
NAN
)
{}
...
...
@@ -252,7 +253,9 @@ public:
rval
=
patches
[
i
][
j
];
if
(
rval
==
NULL
)
{
if
(
!
create
)
return
rval
;
if
(
!
create
)
{
return
rval
;
}
// just create an empty map
rval
=
newMap
(
i
,
j
);
patches
[
i
][
j
]
=
rval
;
...
...
@@ -270,7 +273,8 @@ public:
// returns the row (i) and column (j) of the heightmap containing x, y
inline
void
getIJ
(
float
x
,
float
y
,
unsigned
int
&
i
,
unsigned
int
&
j
)
{
// note: assumes the submaps are using SUB_WIDTH and SUB_HEIGHT
double
ti
,
tj
;
double
ti
;
double
tj
;
tj
=
x
-
offsetX
;
ti
=
y
-
offsetY
;
...
...
@@ -284,11 +288,13 @@ public:
j
=
(
int
)
floor
(
tj
);
i
=
(
int
)
floor
(
ti
);
if
(
j
==
__UINT32_MAX__
)
if
(
j
==
__UINT32_MAX__
)
{
j
=
0
;
if
(
i
==
__UINT32_MAX__
)
}
if
(
i
==
__UINT32_MAX__
)
{
i
=
0
;
}
}
// checks if i,j is a valid heightmap
inline
bool
valid
(
unsigned
int
i
,
unsigned
int
j
)
{
...
...
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