Skip to content
Snippets Groups Projects
Commit f1704fde authored by vahrenkamp's avatar vahrenkamp
Browse files

minor fix of DiffIK (failed when tcp was not a RobotNode)

git-svn-id: http://svn.code.sf.net/p/simox/code/trunk@770 042f3d55-54a8-47e9-b7fb-15903f145c44
parent 013a60c5
No related branches found
No related tags found
No related merge requests found
......@@ -321,18 +321,6 @@ namespace VirtualRobot
// THROW_VR_EXCEPTION_IF(!tcp,boost::format("No tcp defined in node set \"%1%\" of robot %2% (DifferentialIK::%3% )") % this->rns->getName() % this->rns->getRobot()->getName() % BOOST_CURRENT_FUNCTION);
RobotNodePtr tcpRN = boost::dynamic_pointer_cast<RobotNode>(tcp);
if (parents.find(tcpRN) == parents.end())
{
parents[tcpRN] = tcpRN->getAllParents(rns);
parents[tcpRN].push_back(tcpRN);
}
Eigen::Vector3f axis;
Eigen::Vector3f toTCP;
tmpUpdateJacobianPosition.setZero();
tmpUpdateJacobianOrientation.setZero();
if (!tcpRN)
{
if (!tcp->getParent())
......@@ -352,6 +340,18 @@ namespace VirtualRobot
}
}
if (parents.find(tcpRN) == parents.end())
{
parents[tcpRN] = tcpRN->getAllParents(rns);
parents[tcpRN].push_back(tcpRN);
}
Eigen::Vector3f axis;
Eigen::Vector3f toTCP;
tmpUpdateJacobianPosition.setZero();
tmpUpdateJacobianOrientation.setZero();
// Iterate over all degrees of freedom
for (size_t i = 0; i < nDoF; i++)
{
......
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