Skip to content
Snippets Groups Projects
Commit db9c9d77 authored by Nikolaus Vahrenkamp's avatar Nikolaus Vahrenkamp
Browse files

Added method to query for current control modes: allows to initialize...

Added method to query for current control modes: allows to initialize KinemticGuiPlugin with actual control values
parent fd5ce323
No related branches found
No related tags found
No related merge requests found
......@@ -270,6 +270,16 @@ void KinematicUnitSimulation::setJointTorques(const NameValueMap& targetJointTor
listenerPrx->reportJointTorques(actualJointTorques, aValueChanged);
}
NameControlModeMap KinematicUnitSimulation::getControlModes(const Ice::Current& c)
{
NameControlModeMap result;
for ( KinematicUnitSimulationJointStates::iterator it = jointStates.begin(); it!=jointStates.end(); it++ )
{
result[it->first] = it->second.controlMode;
}
return result;
}
void KinematicUnitSimulation::setJointAccelerations(const NameValueMap& targetJointAccelerations, const Ice::Current& c)
{
}
......
......@@ -140,6 +140,8 @@ namespace armarx
virtual void setJointVelocities(const NameValueMap& targetJointVelocities, const Ice::Current& c = ::Ice::Current());
virtual void setJointTorques(const NameValueMap& targetJointTorques, const Ice::Current& c = ::Ice::Current());
virtual NameControlModeMap getControlModes(const Ice::Current& c = ::Ice::Current());
/**
* \warning Not implemented yet!
*/
......
......@@ -146,6 +146,10 @@ void KinematicUnitWidgetController::onConnectComponent()
std::string kinematicUnitInstructionChannel = kinematicUnitName;
// NOW: kinematicUnitInstructionChannel -> HeadKinematicUnit
kinematicUnitInterfacePrx = getProxy<KinematicUnitInterfacePrx>(kinematicUnitInstructionChannel);
// init control mode map
reportedJointControlModes = kinematicUnitInterfacePrx->getControlModes();
initializeUi();
enableMainWidgetAsync(true);
}
......
......@@ -171,6 +171,12 @@ module armarx
void setJointAccelerations(NameValueMap targetJointAccelerations) throws OutOfRangeException;
void setJointDecelerations(NameValueMap targetJointDecelerations) throws OutOfRangeException;
/*!
* Returns the current control mode setup of all joints.
* @return List with current control modes
*/
NameControlModeMap getControlModes();
/*
* NYI
*/
......
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