Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added covariances #7

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cea7407
Added covariances
JanezCim Jan 11, 2021
2773805
Diagnostic code and hack patch to lower impact of bad IMU values
mjstn Jan 30, 2021
87e1558
Clean up most debug logs so this can be tested. This is fairly ugly …
mjstn Jan 30, 2021
7e3e31e
Explicitly declare IMURecord as a packed to avoid surprises
adamheinrich Feb 2, 2021
acff808
Atomic read WiP (untested)
adamheinrich Feb 2, 2021
1263be7
Added debug for trigger scope on D15 faults. This is being pushed wit…
mjstn Feb 3, 2021
5de02b8
Merge pull request #1 from JanezCim/imuDiagPatchTests
JanezCim Feb 22, 2021
950731d
Expose parameter to change IMU operation mode
adamheinrich Apr 30, 2021
51da324
Expose parameters to control range and bandwidth of accelerometer and…
adamheinrich Apr 30, 2021
9e73ea3
Remove I2C_M_NOSTART from i2c transfer flags as it is not always supp…
adamheinrich Apr 30, 2021
a6bb3e1
Merge branch 'atomic_read' into sensor_config
adamheinrich Apr 30, 2021
c8c0fae
Add parameters to enable/disable raw, data and status readout
adamheinrich Apr 30, 2021
af22cb0
Perform sensor configuration in the CONFIG mode of BNO055
adamheinrich May 4, 2021
e57bf41
Add some sleeps between I2C writes just to be sure
adamheinrich May 4, 2021
f02f51d
Merge code from the master branch
adamheinrich May 5, 2021
1e85924
Remove variable sampleIdx, replace by seq which is already in use
adamheinrich May 5, 2021
6e77722
Disabling topics with params, additional documentation
JanezCim May 5, 2021
2d29d0b
Only advertise mag when enable_raw=1 and temp when enable_status=1
adamheinrich May 5, 2021
bf5130a
Merge pull request #2 from JanezCim/sensor_config
JanezCim May 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion imu_bno055/include/imu_bno055/bno055_i2c_activity.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#define BNO055_BL_REV_ID_ADDR 0X06
#define BNO055_PAGE_ID_ADDR 0X07

#define BNO055_ACC_CONFIG 0X08 // Page 1
#define BNO055_GYR_CONFIG_0 0X0A // Page 1

#define BNO055_ACCEL_DATA_X_LSB_ADDR 0X08
#define BNO055_ACCEL_DATA_X_MSB_ADDR 0X09
#define BNO055_ACCEL_DATA_Y_LSB_ADDR 0X0A
Expand Down Expand Up @@ -199,7 +202,7 @@ namespace imu_bno055 {

// order of this struct is designed to match the I2C registers
// so all data can be read in one fell swoop
typedef struct {
typedef struct __attribute__((__packed__)) {
int16_t raw_linear_acceleration_x;
int16_t raw_linear_acceleration_y;
int16_t raw_linear_acceleration_z;
Expand Down Expand Up @@ -243,6 +246,8 @@ class BNO055I2CActivity {
bool onServiceCalibrate(std_srvs::Trigger::Request &req, std_srvs::Trigger::Response &res);

private:
int operation_mode();
bool configure_sensors();
bool reset();

// class variables
Expand All @@ -253,7 +258,15 @@ class BNO055I2CActivity {
// ROS parameters
std::string param_frame_id;
std::string param_device;
std::string param_operation_mode;
int param_address;
double param_acc_bandwidth;
double param_gyro_bandwidth;
int param_acc_range;
int param_gyro_range;
bool param_enable_raw;
bool param_enable_data;
bool param_enable_status;

// ROS node handles
ros::NodeHandle nh;
Expand Down
14 changes: 14 additions & 0 deletions imu_bno055/launch/imu.launch
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
<launch>
<!-- bno datasheet https://cdn-shop.adafruit.com/datasheets/BST_BNO055_DS000_12.pdf -->
<node ns="imu" name="imu_node" pkg="imu_bno055" type="bno055_i2c_node" respawn="true" respawn_delay="2">
<param name="device" type="string" value="/dev/i2c-1"/>
<param name="address" type="int" value="40"/> <!-- 0x28 == 40 is the default for BNO055 -->
<param name="frame_id" type="string" value="imu"/>
<param name="operation_mode" type="string" value="ACCGYRO"/> <!-- Possible values: datasheet page 20-->

<!--Possible values: 7.81, 15.63, 31.25,62.5, 125.0, 250.0, 500.0, 1000.0,
if operation_mode is set to one of Non-fusionmodes (see datasheet page 20) acc_bandwidth does not work-->
<param name="acc_bandwidth" type="double" value="15.63"/>

<!-- enabling/disabling some of the sensor data readings -->
<param name="enable_raw" type="bool" value="true"/>
<param name="enable_data" type="bool" value="false"/>
<param name="enable_status" type="bool" value="false"/>

<!-- rate at which imu data is sent to ros topic (Hz) -->
<param name="rate" type="int" value="32"/>
</node>
</launch>
Loading