Skip to content
Snippets Groups Projects

Improve armar7 platform movement

Merged Tobias Gröger requested to merge feature/improve-armar7-platform-movement into master
All threads resolved!
11 files
+ 272
136
Compare changes
  • Side-by-side
  • Inline
Files
11
  • d4bc11c2
    Add a common base class for both HolonomicPlatformVelocity controllers
    and add a property with which to choose one.
    Make the acceleration limits also configurable via properties.
@@ -32,8 +32,7 @@ namespace armarx
NJointHolonomicPlatformUnitVelocityPassThroughController(
RobotUnit* prov,
NJointHolonomicPlatformUnitVelocityPassThroughControllerConfigPtr cfg,
const VirtualRobot::RobotPtr&) :
maxCommandDelay(IceUtil::Time::milliSeconds(500))
const VirtualRobot::RobotPtr&)
{
target = useControlTarget(cfg->platformName, ControlModes::HolonomicPlatformVelocity)
->asA<ControlTargetHolonomicPlatformVelocity>();
@@ -72,32 +71,6 @@ namespace armarx
}
}
void
NJointHolonomicPlatformUnitVelocityPassThroughController::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
NJointHolonomicPlatformUnitVelocityPassThroughController::getMaxCommandDelay() const
{
return maxCommandDelay;
}
void
NJointHolonomicPlatformUnitVelocityPassThroughController::setMaxCommandDelay(
const IceUtil::Time& value)
{
maxCommandDelay = value;
}
NJointControllerRegistration<NJointHolonomicPlatformUnitVelocityPassThroughController>
registrationNJointHolonomicPlatformUnitVelocityPassThroughController(
"NJointHolonomicPlatformUnitVelocityPassThroughController");
Loading