Commit afbfcf02 authored by Sydney Speckle's avatar Sydney Speckle

fix compile errors triggered by change of names in emros_common package

parent 624830ac
......@@ -24,6 +24,11 @@
using namespace EMROSCmdType::Basecontroller;
class Basecontroller
{
public:
......
......@@ -18,6 +18,20 @@
using namespace EMROSCmdType::Basecontroller;
enum class KinematicMode {
MECANUM,DIFFERENTIAL
};
struct Config
{
double wheel_dia;
double length_robot;
double width_robot;
double controller_frequency;
KinematicMode mode_of_operation;
};
//////////////////////INTERFACE/////////////////////////////////////////////
class Kinematics
......
......@@ -16,12 +16,12 @@ Basecontroller::Basecontroller() :
getParam();
switch (mBaseConfig.mode_of_operation)
{
case ModeOfOperation::DIFFERENTIAL:
case KinematicMode::DIFFERENTIAL:
mKinematic = new DifferentialKinematics(mBaseConfig);
break;
case ModeOfOperation::MECANUM:
case KinematicMode::MECANUM:
mKinematic = new MecanumKinematics(mBaseConfig);
break;
......@@ -52,12 +52,12 @@ inline TargetVelocitiesInterface* Basecontroller::getTargetVelocitiesInstance()
TargetVelocitiesInterface* pReturn;
switch (mBaseConfig.mode_of_operation)
{
case ModeOfOperation::DIFFERENTIAL:
case KinematicMode::DIFFERENTIAL:
pReturn = new TargetWheelVelocities2WD;
break;
case ModeOfOperation::MECANUM:
case KinematicMode::MECANUM:
pReturn = new TargetWheelVelocities4WD;
break;
}
......@@ -69,12 +69,12 @@ inline ActualVelocitiesInterface* Basecontroller::getActualVelocitiesInstance()
ActualVelocitiesInterface* pReturn;
switch (mBaseConfig.mode_of_operation)
{
case ModeOfOperation::DIFFERENTIAL:
case KinematicMode::DIFFERENTIAL:
pReturn = new ActualWheelVelocities2WD;
break;
case ModeOfOperation::MECANUM:
case KinematicMode::MECANUM:
pReturn = new ActualWheelVelocities4WD;
break;
}
......@@ -94,11 +94,11 @@ void Basecontroller::getParam()
if (mode_of_operation.compare("DIFFERENTIAL") == 0)
{
mBaseConfig.mode_of_operation = ModeOfOperation::DIFFERENTIAL;
mBaseConfig.mode_of_operation = KinematicMode::DIFFERENTIAL;
}
else if (mode_of_operation.compare("MECANUM") == 0)
{
mBaseConfig.mode_of_operation = ModeOfOperation::MECANUM;
mBaseConfig.mode_of_operation = KinematicMode::MECANUM;
}
else
{
......
Subproject commit bd0ea5a9ec501fa7cedba7a0e94ce09996e2842b
Subproject commit e760644f8625a2f7dd70986657fe601a2a7e1cb0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment