#654 Adding Euler offset function to IMU interface.

Release-3.0
closed-accepted
Player (393)
5
2011-11-01
2011-10-09
No

Whilst writing a Player driver for the Sparkfun Razor IMU I found that it would be useful for our robots to have the ability to apply an offset to the roll, pitch and yaw values coming from the IMU. Rather than doing this client side, the most sensible location is on the driver. This is useful for correcting for the orientation of the IMU if, for example, the IMU is not in line with the robot's heading, etc.

In order to also provide my Razor IMU driver, this patch no needs to be included in the Player tree first.

Discussion

  • Michael Clarke

    Michael Clarke - 2011-10-09

    Player IMU interface SVN diff patch.

     
  • Rich Mattes

    Rich Mattes - 2011-10-16

    If these are simple offsets, would it make more sense to add them to your driver as properties rather than adding a reset message to the interface?

     
  • Michael Clarke

    Michael Clarke - 2011-10-17

    I understand your point regarding using properties. However, I think that this solution is more elegant and re-usable. Using properties will mean that there is an inconsistent approach to applying offsets across IMU drivers; i.e. people will inevitably name their driver specific "rollOffset", "pitchOffset" and "yawOffset" properties differently, or give them different types, etc.

    This will mean that any client written for the Razor IMU would need to be modified to function with another IMU. Adding this ability to the interface instead, means that client side programs will not have to worry about the naming of 'offset' values, etc.

     
  • Rich Mattes

    Rich Mattes - 2011-11-01
    • status: open --> closed-accepted
     
  • Rich Mattes

    Rich Mattes - 2011-11-01

    Sorry for the long delay. I applied the patch, but with one small change: I used a player_orientation3d_t struct instead of specifying roll, pitch, and yaw separately. This keeps things consistent with the euler data message, but the playerc and playerc++ functions aren't affected at all. I guess your driver will require a small tweak before it can be incorporated.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks