Skip to content
Snippets Groups Projects
Commit 33c65906 authored by Fabian Reister's avatar Fabian Reister
Browse files

NjointCartesianWaypointController: using global pose info directly from provided VirtualRobot

parent 382cf8b8
No related branches found
No related tags found
1 merge request!389Armar7 unit / integration
...@@ -129,8 +129,8 @@ namespace armarx ...@@ -129,8 +129,8 @@ namespace armarx
} }
//visu //visu
{ {
_tripFakeRobotGP.getWriteBuffer()(0, 0) = std::nanf(""); _tripRt2NonRtRobotGP.getWriteBuffer().setIdentity();
_tripFakeRobotGP.commitWrite(); _tripRt2NonRtRobotGP.commitWrite();
} }
} }
...@@ -281,6 +281,9 @@ namespace armarx ...@@ -281,6 +281,9 @@ namespace armarx
} }
} }
_tripRt2NonRt.commitWrite(); _tripRt2NonRt.commitWrite();
_tripRt2NonRtRobotGP.getWriteBuffer() = _rtRobot->getGlobalPose();
_tripRt2NonRtRobotGP.commitWrite();
} }
void void
...@@ -412,17 +415,13 @@ namespace armarx ...@@ -412,17 +415,13 @@ namespace armarx
NJointCartesianWaypointController::setVisualizationRobotGlobalPose(const Eigen::Matrix4f& p, NJointCartesianWaypointController::setVisualizationRobotGlobalPose(const Eigen::Matrix4f& p,
const Ice::Current&) const Ice::Current&)
{ {
std::lock_guard g{_tripFakeRobotGPWriteMutex}; ; // No longer used ...
_tripFakeRobotGP.getWriteBuffer() = p;
_tripFakeRobotGP.commitWrite();
} }
void void
NJointCartesianWaypointController::resetVisualizationRobotGlobalPose(const Ice::Current&) NJointCartesianWaypointController::resetVisualizationRobotGlobalPose(const Ice::Current&)
{ {
std::lock_guard g{_tripFakeRobotGPWriteMutex}; ; // No longer used ...
_tripFakeRobotGP.getWriteBuffer()(0, 0) = std::nanf("");
_tripFakeRobotGP.commitWrite();
} }
void void
...@@ -477,7 +476,7 @@ namespace armarx ...@@ -477,7 +476,7 @@ namespace armarx
std::lock_guard g{_tripRt2NonRtMutex}; std::lock_guard g{_tripRt2NonRtMutex};
const auto& buf = _tripRt2NonRt.getUpToDateReadBuffer(); const auto& buf = _tripRt2NonRt.getUpToDateReadBuffer();
const Eigen::Matrix4f fakeGP = _tripFakeRobotGP.getUpToDateReadBuffer(); const Eigen::Matrix4f fakeGP = _tripRt2NonRtRobotGP.getUpToDateReadBuffer();
const Eigen::Matrix4f gp = std::isfinite(fakeGP(0, 0)) ? fakeGP : buf.rootPose; const Eigen::Matrix4f gp = std::isfinite(fakeGP(0, 0)) ? fakeGP : buf.rootPose;
if (buf.tcp != buf.tcpTarg) if (buf.tcp != buf.tcpTarg)
......
...@@ -146,8 +146,7 @@ namespace armarx ...@@ -146,8 +146,7 @@ namespace armarx
mutable std::recursive_mutex _tripRt2NonRtMutex; mutable std::recursive_mutex _tripRt2NonRtMutex;
TripleBuffer<RtToNonRtData> _tripRt2NonRt; TripleBuffer<RtToNonRtData> _tripRt2NonRt;
mutable std::recursive_mutex _tripFakeRobotGPWriteMutex; TripleBuffer<Eigen::Matrix4f> _tripRt2NonRtRobotGP;
TripleBuffer<Eigen::Matrix4f> _tripFakeRobotGP;
//publish data //publish data
std::atomic_size_t _publishWpsNum{0}; std::atomic_size_t _publishWpsNum{0};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment