Skip to content
Snippets Groups Projects
Commit f9f1fdef authored by Tobias Gröger's avatar Tobias Gröger
Browse files

Use new NJointHolonomicPlatformVelocityControllerWithRamp in RobotUnit

parent bafa5e1c
No related branches found
No related tags found
1 merge request!451Improve armar7 platform movement
Pipeline #18977 passed
......@@ -27,7 +27,6 @@
#include <RobotAPI/libraries/core/CartesianVelocityRamp.h>
#include "../ControlTargets/ControlTargetHolonomicPlatformVelocity.h"
#include "../util.h"
#include "NJointControllerWithTripleBuffer.h"
namespace armarx
......
......@@ -449,15 +449,19 @@ namespace armarx::RobotUnitModule
Component::create<UnitT>(properties, configName, getConfigDomain());
//config
ARMARX_TRACE;
NJointHolonomicPlatformUnitVelocityPassThroughControllerConfigPtr config =
new NJointHolonomicPlatformUnitVelocityPassThroughControllerConfig;
NJointHolonomicPlatformVelocityControllerWithRampConfigPtr config =
new NJointHolonomicPlatformVelocityControllerWithRampConfig;
config->initialVelocityX = 0;
config->initialVelocityY = 0;
config->initialVelocityRotation = 0;
config->platformName = _module<RobotData>().getRobotPlatformName();
auto ctrl = NJointHolonomicPlatformUnitVelocityPassThroughControllerPtr::dynamicCast(
config->maxPositionAcceleration = 800;
config->maxOrientationAcceleration = 80;
auto ctrl = NJointHolonomicPlatformVelocityControllerWithRampPtr::dynamicCast(
_module<ControllerManagement>().createNJointController(
"NJointHolonomicPlatformUnitVelocityPassThroughController",
"NJointHolonomicPlatformVelocityControllerWithRamp",
getName() + "_" + configName + "_VelPTContoller",
config,
false,
......@@ -479,7 +483,6 @@ namespace armarx::RobotUnitModule
false,
true));
ARMARX_CHECK_EXPRESSION(ctrlRelativePosition);
unit->pt = ctrl;
unit->relativePosCtrl = ctrlRelativePosition;
// unit->platformSensorIndex = _module<Devices>().getSensorDevices().index(_module<RobotData>().getRobotPlatformName());
......@@ -496,7 +499,6 @@ namespace armarx::RobotUnitModule
true));
ARMARX_TRACE;
ARMARX_CHECK_EXPRESSION(ctrlGlobalPosition);
unit->pt = ctrl;
unit->globalPosCtrl = ctrlGlobalPosition;
ARMARX_TRACE;
......
......@@ -31,6 +31,7 @@
#include <RobotAPI/components/units/PlatformUnit.h>
#include <RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformGlobalPositionController.h>
#include <RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformRelativePositionController.h>
#include <RobotAPI/components/units/RobotUnit/NJointControllers/NJointHolonomicPlatformVelocityControllerWithRamp.h>
#include <RobotAPI/interface/core/RobotState.h>
#include <RobotAPI/libraries/core/Pose.h>
......@@ -93,7 +94,7 @@ namespace armarx
void stopPlatform(const Ice::Current& c = Ice::emptyCurrent) override;
NJointHolonomicPlatformUnitVelocityPassThroughControllerPtr pt;
NJointHolonomicPlatformVelocityControllerWithRampPtr pt;
NJointHolonomicPlatformRelativePositionControllerPtr relativePosCtrl;
NJointHolonomicPlatformGlobalPositionControllerPtr globalPosCtrl;
......
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