File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ void RockControl::constrainAngle(double& angle)
35
35
* Rotation should be between PI an -PI.
36
36
* Translation should be between 10 and -10.
37
37
*/
38
- void RockControl::constrainValues (base::MotionCommand2D & motionCommand)
38
+ void RockControl::constrainValues (base::commands::Motion2D & motionCommand)
39
39
{
40
40
if (motionCommand.rotation > M_PI)
41
41
motionCommand.rotation = M_PI;
@@ -48,9 +48,9 @@ void RockControl::constrainValues(base::MotionCommand2D& motionCommand)
48
48
motionCommand.translation = -10 ;
49
49
}
50
50
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)
52
52
{
53
- base::MotionCommand2D command = inputCommand;
53
+ base::commands::Motion2D command = inputCommand;
54
54
constrainValues (command);
55
55
56
56
// translation and rotation relativ to the task period
Original file line number Diff line number Diff line change 1
1
#ifndef ROCKCONTROL_H
2
2
#define ROCKCONTROL_H
3
3
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 >
6
6
7
7
namespace rock_tutorial {
8
8
@@ -13,14 +13,14 @@ class RockControl
13
13
RockControl ();
14
14
virtual ~RockControl ();
15
15
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);
17
17
18
18
void setRockRadius (double r) { rockRadius = r; }
19
19
double getRockRadius () { return rockRadius; }
20
20
21
21
private:
22
22
void constrainAngle (double & angle);
23
- void constrainValues (base::MotionCommand2D & motionCommand);
23
+ void constrainValues (base::commands::Motion2D & motionCommand);
24
24
base::samples::RigidBodyState currentPose;
25
25
double currentHeading;
26
26
double currentPitch;
You can’t perform that action at this time.
0 commit comments