Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CCF Immersive Sorting Demo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
CeTI
ROS
CeTI Cobotic Framework
CCF Immersive Sorting Demo
Commits
13073468
Commit
13073468
authored
2 years ago
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
add localization error output
parent
0000368f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/object_locator.cpp
+11
-1
11 additions, 1 deletion
src/object_locator.cpp
with
11 additions
and
1 deletion
src/object_locator.cpp
+
11
−
1
View file @
13073468
...
...
@@ -31,6 +31,14 @@ using CetiRosToolbox::getPrivateParameter;
const
std
::
string
CELL_BUNDLE
=
"CETI_TABLE_ONE"
;
const
double
TABLE_HEIGHT
=
0.89
;
const
double
GRID_SIZE
=
0.05
;
const
double
MAX_ERROR
=
0.02
;
double
distanceToGrid
(
geometry_msgs
::
Point
point
,
double
grid_size
)
{
double
x_error
=
(
std
::
round
(
point
.
x
/
grid_size
))
*
grid_size
-
point
.
x
;
double
y_error
=
(
std
::
round
(
point
.
y
/
grid_size
))
*
grid_size
-
point
.
y
;
return
std
::
sqrt
(
x_error
*
x_error
+
y_error
*
y_error
);
}
geometry_msgs
::
Point
closestGridPoint
(
geometry_msgs
::
Point
point
,
double
grid_size
)
{
...
...
@@ -165,6 +173,8 @@ int main(int argc, char** argv)
<<
pose
.
position
.
z
-
TABLE_HEIGHT
);
continue
;
}
double
e
=
distanceToGrid
(
pose
.
position
,
GRID_SIZE
);
ROS_ERROR_STREAM
(
"object "
<<
name
<<
" has an error of "
<<
e
);
// sanitize pose
relevant_poses
[
name
]
=
pose
;
...
...
@@ -215,4 +225,4 @@ int main(int argc, char** argv)
}
return
0
;
}
\ No newline at end of file
}
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