Skip to content

Commit ca3f377

Browse files
committed
added conversion deg to rad on theta
1 parent a013ac5 commit ca3f377

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/robotics/kinematics.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Kinematics{
104104
void resetPose(const float initial_x=0.0, const float initial_y=0.0, const float initial_theta=0.0){
105105
x=initial_x;
106106
y=initial_y;
107-
theta=initial_theta;
107+
theta=degs_to_rads*initial_theta;
108108
travel=0.0;
109109
delta_x=0.0;
110110
delta_y=0.0;
@@ -124,7 +124,7 @@ class Kinematics{
124124
}
125125

126126
float getTheta(){
127-
return theta;
127+
return rads_to_degs*theta;
128128
}
129129

130130
float getTravel(){
@@ -140,7 +140,7 @@ class Kinematics{
140140
}
141141

142142
float getDeltaTheta(){
143-
return delta_theta;
143+
return rads_to_degs*delta_theta;
144144
}
145145

146146

0 commit comments

Comments
 (0)