Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lennard Hofmann
RobotAPI
Commits
77f97de0
Commit
77f97de0
authored
3 years ago
by
Fabian Reister
Browse files
Options
Downloads
Patches
Plain Diff
conversions for occupancy grid
parent
3b9b0506
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/libraries/armem_vision/aron_conversions.cpp
+21
-3
21 additions, 3 deletions
source/RobotAPI/libraries/armem_vision/aron_conversions.cpp
source/RobotAPI/libraries/armem_vision/aron_conversions.h
+34
-23
34 additions, 23 deletions
source/RobotAPI/libraries/armem_vision/aron_conversions.h
with
55 additions
and
26 deletions
source/RobotAPI/libraries/armem_
robot_mapping
/aron_conversions.cpp
→
source/RobotAPI/libraries/armem_
vision
/aron_conversions.cpp
+
21
−
3
View file @
77f97de0
...
...
@@ -5,14 +5,16 @@
#include
<iterator>
#include
<RobotAPI/interface/units/LaserScannerUnit.h>
#include
<RobotAPI/libraries/armem_
robot_mapping
/aron/LaserScan.aron.generated.h>
#include
<RobotAPI/libraries/armem_
vision
/aron/LaserScan.aron.generated.h>
#include
<RobotAPI/libraries/aron/converter/common/Converter.h>
#include
<RobotAPI/libraries/aron/core/navigator/data/complex/NDArray.h>
#include
<RobotAPI/libraries/aron/common/aron_conversions.h>
#include
"types.h"
namespace
armarx
namespace
armarx
::
armem
{
/************ fromAron ************/
...
...
@@ -96,5 +98,21 @@ namespace armarx
toAron
(
laserScanStamped
,
aronLaserScanStamped
);
}
void
toAron
(
arondto
::
OccupancyGrid
&
dto
,
const
OccupancyGrid
&
bo
)
{
aron
::
toAron
(
dto
.
frame
,
bo
.
frame
);
aron
::
toAron
(
dto
.
pose
,
bo
.
pose
);
aron
::
toAron
(
dto
.
resolution
,
bo
.
resolution
);
// bo.grid is NdArray -> need special handling.
}
void
fromAron
(
arondto
::
OccupancyGrid
&
dto
,
OccupancyGrid
&
bo
)
{
aron
::
fromAron
(
dto
.
frame
,
bo
.
frame
);
aron
::
fromAron
(
dto
.
pose
,
bo
.
pose
);
aron
::
fromAron
(
dto
.
resolution
,
bo
.
resolution
);
// bo.grid is NdArray -> need special handling.
}
}
// namespace armarx
\ No newline at end of file
}
// namespace armarx::armem
\ No newline at end of file
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/armem_
robot_mapping
/aron_conversions.h
→
source/RobotAPI/libraries/armem_
vision
/aron_conversions.h
+
34
−
23
View file @
77f97de0
...
...
@@ -19,52 +19,63 @@
* GNU General Public License
*/
#pragma once
#include
"RobotAPI/libraries/armem_vision/types.h"
#include
<RobotAPI/interface/units/LaserScannerUnit.h>
#include
<RobotAPI/libraries/armem/core/Time.h>
#include
<RobotAPI/libraries/armem_vision/aron/OccupancyGrid.aron.generated.h>
#include
<RobotAPI/libraries/aron/converter/common/VectorConverter.h>
#include
<RobotAPI/libraries/aron/core/navigator/data/complex/NDArray.h>
#include
<RobotAPI/libraries/armem/core/Time.h>
namespace
armarx
namespace
armarx
::
armem
{
namespace
arondto
{
struct
LaserScanStamped
;
}
// namespace aron
}
// namespace aron
dto
// struct LaserScan;
struct
LaserScanStamped
;
void
fromAron
(
const
arondto
::
LaserScanStamped
&
aronLaserScan
,
LaserScan
&
laserScan
,
std
::
int64_t
&
timestamp
,
std
::
string
&
frame
,
std
::
string
&
agentName
);
void
fromAron
(
const
arondto
::
LaserScanStamped
&
aronLaserScan
,
LaserScan
&
laserScan
,
std
::
int64_t
&
timestamp
,
std
::
string
&
frame
,
std
::
string
&
agentName
);
template
<
typename
T
>
template
<
typename
T
>
auto
fromAron
(
const
aron
::
datanavigator
::
NDArrayNavigatorPtr
&
navigator
)
{
return
aron
::
converter
::
AronVectorConverter
::
ConvertToVector
<
T
>
(
navigator
);
return
aron
::
converter
::
AronVectorConverter
::
ConvertToVector
<
T
>
(
navigator
);
}
void
fromAron
(
const
arondto
::
LaserScanStamped
&
aronLaserScan
,
LaserScanStamped
&
laserScan
);
void
fromAron
(
const
arondto
::
LaserScanStamped
&
aronLaserScan
,
LaserScanStamped
&
laserScan
);
void
toAron
(
const
LaserScan
&
laserScan
,
const
armem
::
Time
&
timestamp
,
const
std
::
string
&
frame
,
const
std
::
string
&
agentName
,
arondto
::
LaserScanStamped
&
aronLaserScan
);
void
toAron
(
const
LaserScan
&
laserScan
,
const
armem
::
Time
&
timestamp
,
const
std
::
string
&
frame
,
const
std
::
string
&
agentName
,
arondto
::
LaserScanStamped
&
aronLaserScan
);
inline
aron
::
datanavigator
::
NDArrayNavigatorPtr
toAron
(
const
LaserScan
&
laserScan
)
inline
aron
::
datanavigator
::
NDArrayNavigatorPtr
toAron
(
const
LaserScan
&
laserScan
)
{
return
aron
::
converter
::
AronVectorConverter
::
ConvertFromVector
(
laserScan
);
using
aron
::
converter
::
AronVectorConverter
;
return
AronVectorConverter
::
ConvertFromVector
(
laserScan
);
}
// OccupancyGrid
void
toAron
(
arondto
::
OccupancyGrid
&
dto
,
const
OccupancyGrid
&
bo
);
void
fromAron
(
arondto
::
OccupancyGrid
&
dto
,
OccupancyGrid
&
bo
);
inline
aron
::
datanavigator
::
NDArrayNavigatorPtr
toAron
(
const
OccupancyGrid
::
Grid
&
grid
)
{
return
aron
::
converter
::
AronVectorConverter
::
ConvertFromVector
(
grid
);
}
}
// namespace armarx
\ No newline at end of file
}
// namespace armarx::armem
\ 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