-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
Description
Please provide the following information:
- OS: Ubuntu 20.04 in Tegra
- ROS Distro: Foxy
- Built from source or installed: Installed, built jackal packages from source
- Package version: ee4e3f6
Expected behaviour
The messages in /imu/data_raw have a near zero values in the x and y components when the robot is still.
Actual behaviour
A bias observed throughout a log, in which the robot starts at a still position.

To Reproduce
Provide the steps to reproduce:
- run jackal bringup
- let the robot be still
- ros2 topic echo /imu/data_raw --csv
- plot with R
require('reshape2')
read_csv_and_groom <-function(path, cols_to_select, source)
{
data <- read.csv(path, header = FALSE)
data <- data[,cols_to_select]
colnames(data) <- c('ts', 'ns','x', 'y', 'z')
data$ns <- as.integer(data$ns)
data$ts <- as.integer(data$ts)
# transform secs rel to start
data$ts <- data$ts - data$ts[1]
# keep only milliseconds
data$ms <- data$ns / 1e6
print(data$ns)
print(data$ms)
data$ms <- data$ts * 1e3 + data$ms
data <- melt(data, na.rm = TRUE, id.vars = 'ms', measure.vars = c('x', 'y', 'z'))
data$source <- source
data
}
imu <- read_csv_and_groom('~/Downloads/imu.csv', c(1,2,29,30,31), 'imu')
mag <- read_csv_and_groom('~/Downloads/mag.csv', c(1,2,4,5,6), 'mag')
all <- rbind(imu, mag)
require('ggplot2')
ggplot(all[all$source == 'imu',], aes(x = ms)) +
geom_point(aes(y = value, color=interaction(source, variable)))