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
4a7e630f
Commit
4a7e630f
authored
1 year ago
by
Fabian Reister
Browse files
Options
Downloads
Patches
Plain Diff
formatting and -verbosity
parent
60650331
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/libraries/armem_robot_state/client/common/VirtualRobotReader.cpp
+14
-19
14 additions, 19 deletions
...es/armem_robot_state/client/common/VirtualRobotReader.cpp
with
14 additions
and
19 deletions
source/RobotAPI/libraries/armem_robot_state/client/common/VirtualRobotReader.cpp
+
14
−
19
View file @
4a7e630f
...
...
@@ -13,7 +13,6 @@
#include
<ArmarXCore/core/system/cmake/CMakePackageFinder.h>
#include
<ArmarXCore/core/time/Clock.h>
namespace
armarx
::
armem
::
robot_state
{
...
...
@@ -41,14 +40,14 @@ namespace armarx::armem::robot_state
// const static auto packages = armarx::CMakePackageFinder::FindAllArmarXSourcePackages();
// const auto package = armarx::ArmarXDataPath::getProject(packages, robot.getFilename());
const
robot
::
RobotDescription
robotDescription
{
.
name
=
robot
.
getName
(),
.
xml
=
PackagePath
{
""
,
""
}};
const
robot
::
RobotDescription
robotDescription
{
.
name
=
robot
.
getName
(),
.
xml
=
PackagePath
{
""
,
""
}};
const
auto
robotState
=
queryState
(
robotDescription
,
timestamp
);
if
(
not
robotState
)
{
ARMARX_VERBOSE
<<
"Querying robot state failed for robot `"
<<
robot
.
getName
()
<<
"` "
<<
"(type `"
<<
robot
.
getType
()
<<
"`)!"
;
<<
"(type `"
<<
robot
.
getType
()
<<
"`)!"
;
return
false
;
}
...
...
@@ -63,8 +62,8 @@ namespace armarx::armem::robot_state
const
armem
::
Time
&
timestamp
,
const
VirtualRobot
::
RobotIO
::
RobotDescription
&
loadMode
)
{
ARMARX_
INFO
<<
deactivateSpam
(
60
)
<<
"Querying robot description for robot '"
<<
name
<<
"'"
;
ARMARX_
VERBOSE
<<
deactivateSpam
(
60
)
<<
"Querying robot description for robot '"
<<
name
<<
"'"
;
const
auto
description
=
queryDescription
(
name
,
timestamp
);
if
(
not
description
)
...
...
@@ -77,8 +76,8 @@ namespace armarx::armem::robot_state
const
std
::
string
xmlFilename
=
description
->
xml
.
toSystemPath
();
ARMARX_CHECK
(
std
::
filesystem
::
exists
(
xmlFilename
))
<<
xmlFilename
;
ARMARX_
INFO
<<
"Loading (virtual) robot '"
<<
description
->
name
<<
"' from XML file '"
<<
xmlFilename
<<
"'"
;
ARMARX_
VERBOSE
<<
"Loading (virtual) robot '"
<<
description
->
name
<<
"' from XML file '"
<<
xmlFilename
<<
"'"
;
auto
robot
=
VirtualRobot
::
RobotIO
::
loadRobot
(
xmlFilename
,
loadMode
);
ARMARX_CHECK_NOT_NULL
(
robot
)
<<
"Could not load robot from file `"
<<
xmlFilename
<<
"`"
;
...
...
@@ -88,17 +87,14 @@ namespace armarx::armem::robot_state
return
robot
;
}
VirtualRobot
::
RobotPtr
VirtualRobotReader
::
getSynchronizedRobot
(
const
std
::
string
&
name
,
const
VirtualRobot
::
BaseIO
::
RobotDescription
&
loadMode
,
bool
blocking
)
VirtualRobotReader
::
getSynchronizedRobot
(
const
std
::
string
&
name
,
const
VirtualRobot
::
BaseIO
::
RobotDescription
&
loadMode
,
bool
blocking
)
{
return
_getSynchronizedRobot
(
name
,
armem
::
Time
::
Invalid
(),
loadMode
,
blocking
);
}
VirtualRobot
::
RobotPtr
VirtualRobotReader
::
getSynchronizedRobot
(
const
std
::
string
&
name
,
...
...
@@ -109,13 +105,12 @@ namespace armarx::armem::robot_state
return
_getSynchronizedRobot
(
name
,
timestamp
,
loadMode
,
blocking
);
}
VirtualRobot
::
RobotPtr
VirtualRobotReader
::
_getSynchronizedRobot
(
const
std
::
string
&
name
,
const
Time
&
timestamp
,
const
VirtualRobot
::
BaseIO
::
RobotDescription
&
loadMode
,
bool
blocking
)
const
std
::
string
&
name
,
const
Time
&
timestamp
,
const
VirtualRobot
::
BaseIO
::
RobotDescription
&
loadMode
,
bool
blocking
)
{
while
(
blocking
)
{
...
...
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