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
Florian Leander Singer
RobotAPI
Commits
e96d3060
Commit
e96d3060
authored
7 years ago
by
Mirko Wächter
Browse files
Options
Downloads
Patches
Plain Diff
ft obs: creating real local robot clone from file
parent
3242b0a0
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/units/ForceTorqueObserver.cpp
+4
-4
4 additions, 4 deletions
source/RobotAPI/components/units/ForceTorqueObserver.cpp
with
4 additions
and
4 deletions
source/RobotAPI/components/units/ForceTorqueObserver.cpp
+
4
−
4
View file @
e96d3060
...
...
@@ -80,7 +80,7 @@ void ForceTorqueObserver::onInitObserver()
offeringTopic
(
"DebugDrawerUpdates"
);
auto
sensorRobotNodeSplit
=
armarx
::
Split
(
getProperty
<
std
::
string
>
(
"SensorRobotNodeMapping"
).
getValue
(),
","
);
for
(
auto
&
elem
:
sensorRobotNodeSplit
)
for
(
auto
&
elem
:
sensorRobotNodeSplit
)
{
boost
::
trim
(
elem
);
auto
split
=
armarx
::
Split
(
elem
,
":"
);
...
...
@@ -97,7 +97,7 @@ void ForceTorqueObserver::onInitObserver()
void
ForceTorqueObserver
::
onConnectObserver
()
{
robot
=
getProxy
<
RobotStateComponentInterfacePrx
>
(
getProperty
<
std
::
string
>
(
"RobotStateComponentName"
).
getValue
());
localRobot
=
RemoteRobot
::
createLocalClone
(
robot
);
localRobot
=
RemoteRobot
::
createLocalClone
FromFile
(
robot
,
VirtualRobot
::
RobotIO
::
eStructure
);
debugDrawer
=
getTopic
<
DebugDrawerInterfacePrx
>
(
"DebugDrawerUpdates"
);
if
(
getProperty
<
bool
>
(
"VisualizeForce"
).
getValue
())
{
...
...
@@ -125,7 +125,7 @@ void ForceTorqueObserver::visualizerFunction()
ScopedLock
lock
(
dataMutex
);
std
::
set
<
std
::
string
>
frameAlreadyReported
;
for
(
auto
&
channel
:
channels
)
for
(
auto
&
channel
:
channels
)
{
try
{
...
...
@@ -140,7 +140,7 @@ void ForceTorqueObserver::visualizerFunction()
}
frameAlreadyReported
.
insert
(
value
->
frame
);
auto
force
=
value
->
toGlobal
(
localRobot
);
//
ARMARX_
INFO
<< deactivateSpam(5,channel.first) << "new force" << channel.first << " : " << force->toEigen();
ARMARX_
DEBUG
<<
deactivateSpam
(
5
,
channel
.
first
)
<<
"new force
"
<<
channel
.
first
<<
" : "
<<
force
->
toEigen
()
<<
" original frame: "
<<
value
->
frame
;
float
forceMag
=
force
->
toEigen
().
norm
()
*
forceFactor
;
Vector3Ptr
pos
=
new
Vector3
(
localRobot
->
getRobotNode
(
value
->
frame
)
->
getGlobalPose
());
...
...
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