Skip to content

Commit 43bf301

Browse files
committed
misc fixes
forgot about the feet to meters conversion
1 parent f934c6f commit 43bf301

File tree

1 file changed

+4
-4
lines changed
  • Software/real_time/ROS_RoboBuggy/src/robobuggy/src/transistor/localizer

1 file changed

+4
-4
lines changed

Software/real_time/ROS_RoboBuggy/src/robobuggy/src/transistor/localizer/Localizer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void Localizer::Encoder_Callback(const robobuggy::Encoder::ConstPtr &msg)
1818

1919
double ticks = msg->ticks;
2020
double dx = ticks - prev_encoder_ticks;
21-
dx = dx * 0.61 / 7.0;
21+
dx = dx * 0.61 / 7.0 * 0.3048 * 2;
2222
double body_speed = dx / (dt / 1000.0);
2323

2424
prev_encoder_time = current_time;
@@ -148,8 +148,8 @@ void Localizer::init_P()
148148
void Localizer::init_Q_GPS()
149149
{
150150
Q_GPS <<
151-
1, 0,
152-
0, 1
151+
5, 0,
152+
0, 5
153153
;
154154

155155
std::stringstream s;
@@ -173,7 +173,7 @@ void Localizer::init_Q_Encoder()
173173
void Localizer::init_Q_IMU()
174174
{
175175
Q_IMU <<
176-
0.1
176+
0.05
177177
;
178178

179179
std::stringstream s;

0 commit comments

Comments
 (0)