Skip to content

Commit a623808

Browse files
committed
added IMU flag
1 parent a97f427 commit a623808

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ cmake_minimum_required(VERSION 2.6)
66
project(kore)
77

88
# use c++0x
9+
set(CMAKE_INSTALL_PREFIX /usr)
910
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=gnu++0x")
1011

1112
# Guard against in-source builds

include/kore.hpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ class Hardware {
4646

4747
/// The indicators for the motor groups to be used
4848
enum Mode {
49-
MODE_AMC = 1,
50-
MODE_LARM = 2,
51-
MODE_RARM = 4,
52-
MODE_TORSO = 8,
53-
MODE_WAIST = 16,
54-
MODE_GRIPPERS = 32, ///< Indicates the robotiq grippers (default)
55-
MODE_GRIPPERS_SCH = 64, ///< Indicates the schunk grippers
56-
MODE_ALL = MODE_AMC | MODE_LARM | MODE_RARM | MODE_TORSO | MODE_WAIST | MODE_GRIPPERS,
57-
MODE_ALL_GRIPSCH = MODE_AMC | MODE_LARM | MODE_RARM | MODE_TORSO | MODE_WAIST | MODE_GRIPPERS_SCH
49+
MODE_AMC = 1<<0,
50+
MODE_LARM = 1<<1,
51+
MODE_RARM = 1<<2,
52+
MODE_TORSO = 1<<3,
53+
MODE_WAIST = 1<<4,
54+
MODE_IMU = 1<<5,
55+
MODE_GRIPPERS = 1<<6, ///< Indicates the robotiq grippers (default)
56+
MODE_GRIPPERS_SCH = 1<<7, ///< Indicates the schunk grippers
57+
MODE_ALL = MODE_AMC | MODE_LARM | MODE_RARM | MODE_TORSO | MODE_WAIST | MODE_IMU | MODE_GRIPPERS,
58+
MODE_ALL_GRIPSCH = MODE_AMC | MODE_LARM | MODE_RARM | MODE_TORSO | MODE_WAIST | MODE_IMU | MODE_GRIPPERS_SCH,
5859
};
5960

6061
/// Initializes the interfaces to the motor groups based on the given hardware mode

src/kore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void Hardware::updateSensors (double dt) {
210210
if(mode & MODE_WAIST) somatic_motor_update(daemon_cx, waist);
211211

212212
// Update the imu
213-
getImu(imu_chan, imu, imuSpeed, dt, kfImu);
213+
if(mode & MODE_IMU) getImu(imu_chan, imu, imuSpeed, dt, kfImu);
214214

215215
// Update the arms
216216
if(mode & MODE_LARM) somatic_motor_update(daemon_cx, arms[LEFT]);

0 commit comments

Comments
 (0)