0
$\begingroup$

I'm currently working on the iRobot Create 2 platform using a RaspberryPi (Python) and ROS. I have an indoor navigation/ GPS system, which can provide me with x,y coordinates within its coordinate system. I have thus far implemented a Kalman filter in MATLAB for practice and now am trying to implement on the Create. I also have an IMU but haven't yet implemented that.

I'm currently trying to figure out how to subscribe to the topics from the Marvelmind indoor nav system (but that's a different issue).

My Kalman filter is using [x, y, xdot, ydot], and I believe those should be in the global frame (which I'm taking to be the coordinate system provided by the Marvelmind indoor nav system). That being the case, I can easily get my x and y position from that system; however, I'm not sure what to do about the xdot and ydot. Currently, I have that information from the Create odometry (Twist msgs), but those are in the local frame (since the robot can only go in the x (forward) direction and can't go in y (side to side)). Do I need to transform the local to the global? If yes, do I need to use the IMU to get the angle to use for the transformation?

I feel like I have many pieces, but I'm just not sure how to piece them together. Any advice would be appreciated. Thank you!

$\endgroup$
0

1 Answer 1

0
$\begingroup$

It sounds like you are saying that the navigation system tells you the robot's x and y position within a global reference frame and that the IMU tells you the robot's speed (but not direction) within the same global reference frame. Let's say that these are your two types of measurement.

The kalman filter requires that you provide a transformation from the robot's state space [x,y,xdot,ydot] into the measurement spaces for each of your types of measurements. Here are the two transformations:

GPS: [x,y,xdot,ydot] -> [x,y]

IMU: [x,y,xdot,ydot] -> sqrt(xdot^2 + ydot^2)

Kalman filter also requires a motion model. I think you already have that part, but I'll include it just in case.

Motion: [x,y,xdot,ydot] -> [x + xdot * deltat, y + ydot * deltat, xdot, ydot]

It's okay if some parameters in your state, such as xdot and ydot, are not directly measurable. The kalman filter would still be able to make use of those parameters and narrow down their likely values based on how they affect x and y over time, even if you didn't have speed measurements. Just let the kalman filter work its magic. :-)

$\endgroup$
4
  • $\begingroup$ Thank you for the reply (I'm just seeing this). I think I was able to get my Kalman filter to work (first modeled in MATLAB) and converted to Python. The results seem a little different, but it's working. I have decided to use the IMU in a separate KF to estimate the orientation only. $\endgroup$
    – Erin
    Apr 18, 2018 at 1:22
  • $\begingroup$ Much of the kalman filter’s power comes from combining input from multiple sensor types. I think you’ll get better accuracy by combining both sensor types into one kalman filter. $\endgroup$ Apr 18, 2018 at 2:16
  • $\begingroup$ Yes that definitely makes sense. I think I've been so focused on the magnetometer (for yaw) that I completely forgot about the accelerometer. I'm a bit constrained with time for the moment, but I will definitely have to check that out later. Thanks! $\endgroup$
    – Erin
    Apr 18, 2018 at 4:38
  • $\begingroup$ If this answer helped you then please mark it as accepted. $\endgroup$ Apr 18, 2018 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.