Skip to content

Commit

Permalink
Attempt to correct direction of co-ordintate system Axes.
Browse files Browse the repository at this point in the history
See this ENSTABretagneRobotics#43 for
more details.
  • Loading branch information
Subodh Malgonde authored and Subodh Malgonde committed Jul 20, 2018
1 parent fb23b76 commit 0c0aa56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*~
config/my_razor.yaml
.idea/

6 changes: 3 additions & 3 deletions nodes/imu_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ def reconfig_callback(config, level):
# Publish message
# AHRS firmware accelerations are negated
# This means y and z are correct for ROS, but x needs reversing
imuMsg.linear_acceleration.x = -float(words[3]) * accel_factor
imuMsg.linear_acceleration.y = float(words[4]) * accel_factor
imuMsg.linear_acceleration.z = float(words[5]) * accel_factor
imuMsg.linear_acceleration.x = float(words[3]) * accel_factor
imuMsg.linear_acceleration.y = -float(words[4]) * accel_factor
imuMsg.linear_acceleration.z = -float(words[5]) * accel_factor

imuMsg.angular_velocity.x = float(words[6])
#in AHRS firmware y axis points right, in ROS y axis points left (see REP 103)
Expand Down

0 comments on commit 0c0aa56

Please sign in to comment.