Skip to content

Commit 2e54be7

Browse files
committed
Adapt CamelCase headers and update to base::commmands::Motion2D
1 parent a058053 commit 2e54be7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/RockControl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void RockControl::constrainAngle(double& angle)
3535
* Rotation should be between PI an -PI.
3636
* Translation should be between 10 and -10.
3737
*/
38-
void RockControl::constrainValues(base::MotionCommand2D& motionCommand)
38+
void RockControl::constrainValues(base::commands::Motion2D& motionCommand)
3939
{
4040
if (motionCommand.rotation > M_PI)
4141
motionCommand.rotation = M_PI;
@@ -48,9 +48,9 @@ void RockControl::constrainValues(base::MotionCommand2D& motionCommand)
4848
motionCommand.translation = -10;
4949
}
5050

51-
base::samples::RigidBodyState RockControl::computeNextPose(const double &deltaTime, const base::MotionCommand2D &inputCommand)
51+
base::samples::RigidBodyState RockControl::computeNextPose(const double &deltaTime, const base::commands::Motion2D &inputCommand)
5252
{
53-
base::MotionCommand2D command = inputCommand;
53+
base::commands::Motion2D command = inputCommand;
5454
constrainValues(command);
5555

5656
//translation and rotation relativ to the task period

src/RockControl.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#ifndef ROCKCONTROL_H
22
#define ROCKCONTROL_H
33

4-
#include <base/motion_command.h>
5-
#include <base/samples/rigid_body_state.h>
4+
#include <base/commands/Motion2D.hpp>
5+
#include <base/samples/RigidBodyState.hpp>
66

77
namespace rock_tutorial {
88

@@ -13,14 +13,14 @@ class RockControl
1313
RockControl();
1414
virtual ~RockControl();
1515

16-
base::samples::RigidBodyState computeNextPose(const double &deltaTime, const base::MotionCommand2D &command);
16+
base::samples::RigidBodyState computeNextPose(const double &deltaTime, const base::commands::Motion2D &command);
1717

1818
void setRockRadius(double r) { rockRadius = r; }
1919
double getRockRadius() { return rockRadius; }
2020

2121
private:
2222
void constrainAngle(double& angle);
23-
void constrainValues(base::MotionCommand2D& motionCommand);
23+
void constrainValues(base::commands::Motion2D& motionCommand);
2424
base::samples::RigidBodyState currentPose;
2525
double currentHeading;
2626
double currentPitch;

0 commit comments

Comments
 (0)