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
bc7d1326
Commit
bc7d1326
authored
4 years ago
by
Fabian Paus
Browse files
Options
Downloads
Patches
Plain Diff
ArViz: Handle not readable robot files explicitly
parent
b3f10766
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/components/ArViz/Coin/VisualizationRobot.cpp
+18
-13
18 additions, 13 deletions
source/RobotAPI/components/ArViz/Coin/VisualizationRobot.cpp
with
18 additions
and
13 deletions
source/RobotAPI/components/ArViz/Coin/VisualizationRobot.cpp
+
18
−
13
View file @
bc7d1326
...
...
@@ -34,17 +34,14 @@ namespace armarx::viz::coin
<<
"
\n\t
'"
<<
filename
<<
"'"
<<
"
\n
Consider specifying the containing ArmarX package and relative data path instead to "
<<
"improve portability to other systems."
;
fullFilename
=
filename
;
}
else
// We need to always check that the file is readable otherwise, VirtualRobot::RobotIO::loadRobot crashes
ArmarXDataPath
::
FindPackageAndAddDataPath
(
project
);
if
(
!
ArmarXDataPath
::
SearchReadableFile
(
filename
,
fullFilename
))
{
ArmarXDataPath
::
FindPackageAndAddDataPath
(
project
);
if
(
!
ArmarXDataPath
::
SearchReadableFile
(
filename
,
fullFilename
))
{
ARMARX_INFO
<<
deactivateSpam
()
<<
"Unable to find readable file for name: "
<<
filename
;
return
result
;
}
ARMARX_INFO
<<
deactivateSpam
()
<<
"Unable to find readable file for name: "
<<
filename
;
return
result
;
}
try
...
...
@@ -59,10 +56,18 @@ namespace armarx::viz::coin
// }
ARMARX_INFO
<<
"Loading robot from "
<<
fullFilename
;
result
=
VirtualRobot
::
RobotIO
::
loadRobot
(
fullFilename
,
loadMode
);
result
->
setThreadsafe
(
false
);
// Do we want to propagate joint values? Probably not...
// Closing the hand on the real robot could be implemented on another level
result
->
setPropagatingJointValuesEnabled
(
false
);
if
(
result
)
{
result
->
setThreadsafe
(
false
);
// Do we want to propagate joint values? Probably not...
// Closing the hand on the real robot could be implemented on another level
result
->
setPropagatingJointValuesEnabled
(
false
);
}
else
{
ARMARX_WARNING
<<
"Could not load robot from file: "
<<
fullFilename
<<
"
\n
Reason: loadRobot() returned nullptr"
;
}
}
catch
(
std
::
exception
const
&
ex
)
{
...
...
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