Skip to content
Snippets Groups Projects

Improve armar7 platform movement

Merged Tobias Gröger requested to merge feature/improve-armar7-platform-movement into master
Compare and Show latest version
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
/*
* This file is part of ArmarX.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ArmarX is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI::ArmarXObjects::NJointHolonomicPlatformUnitVelocityPassThroughController
* @author Raphael Grimm ( raphael dot grimm at kit dot edu )
* @date 2017
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#include "NJointHolonomicPlatformVelocityControllerInterface.h"
#include <ArmarXCore/core/exceptions/local/ExpressionException.h>
#include <RobotAPI/components/units/RobotUnit/NJointControllers/NJointControllerRegistry.h>
namespace armarx
{
NJointHolonomicPlatformVelocityControllerInterface::
NJointHolonomicPlatformVelocityControllerInterface() :
maxCommandDelay(IceUtil::Time::milliSeconds(500))
{
}
void
NJointHolonomicPlatformVelocityControllerInterface::setVelocites(float velocityX,
float velocityY,
float velocityRotation)
{
LockGuardType guard{controlDataMutex};
getWriterControlStruct().velocityX = velocityX;
getWriterControlStruct().velocityY = velocityY;
getWriterControlStruct().velocityRotation = velocityRotation;
getWriterControlStruct().commandTimestamp = IceUtil::Time::now();
writeControlStruct();
}
IceUtil::Time
NJointHolonomicPlatformVelocityControllerInterface::getMaxCommandDelay() const
{
return maxCommandDelay;
}
void
NJointHolonomicPlatformVelocityControllerInterface::setMaxCommandDelay(
const IceUtil::Time& value)
{
maxCommandDelay = value;
}
} // namespace armarx
Loading