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

Add eOmc_kalman_filter_config_t to EoMotionControl #64

Merged
merged 3 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cmake_minimum_required(VERSION 3.12)

project(icub_firmware_shared
VERSION 1.25.0)
VERSION 1.25.1)

find_package(YCM 0.11.0 REQUIRED)

Expand Down
22 changes: 18 additions & 4 deletions eth/embobj/plus/comm-v2/icub/EoMotionControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,11 +655,24 @@ typedef uint8_t eOmc_jointId_t;
typedef uint8_t eOmc_torqueControlFilterType_t;


/** @typedef typedef struct eOmc_kalman_filter_config_t
@brief eOmc_kalman_filter_config_t contains the values required to configure the Kalman Filter
**/
typedef struct // size is: 1+3+12+12+4+4= 36
{
eObool_t enabled;
uint8_t filler[3]; // just for explicit padding
float32_t x0[3];
float32_t Q[3];
float32_t R;
float32_t P0;
} eOmc_kalman_filter_config_t; EO_VERIFYsizeof(eOmc_kalman_filter_config_t, 36)


/** @typedef typedef struct eOmc_joint_config_t
@brief eOmc_joint_config_t contains the values required to configure a joint
**/
typedef struct // size is: 40+40+40+8+8+12+4+4+28+2+1+1+4+4+4= 200
typedef struct // size is: 40+40+40+8+8+12+4+4+28+2+1+1+4+4+4+36= 236
{
eOmc_PID_t pidtrajectory; /**< the pid for trajectory control */
eOmc_PID_t piddirect; /**< the pid for direct control */
Expand All @@ -676,7 +689,8 @@ typedef struct // size is: 40+40+40+8+8+12+4+4+28+2+1+1+4+4+4=
float32_t jntEncTolerance;
float32_t gearbox_E2J;
float32_t deadzone;
} eOmc_joint_config_t; EO_VERIFYsizeof(eOmc_joint_config_t, 200)
eOmc_kalman_filter_config_t kalman_params; /**< the kalman filter parameters */
} eOmc_joint_config_t; EO_VERIFYsizeof(eOmc_joint_config_t, 236)


/** @typedef typedef struct eOmc_status_ofpid_legacy_t
Expand Down Expand Up @@ -873,13 +887,13 @@ typedef struct // size is 28+12+1+1+1+1+0 = 44
/** @typedef typedef struct eOmc_joint_t
@brief contains the whole joint
**/
typedef struct // size is 200+96+4+44+0 = 344
typedef struct // size is 236+96+4+44+0 = 380
{
eOmc_joint_config_t config; /**< the configuration of the joint */
eOmc_joint_status_t status; /**< the status of the joint */
eOmc_joint_inputs_t inputs; /**< it contains all the values that a host can send to a joint as inputs */
eOmc_joint_commands_t cmmnds; /**< it contains all the commands that a host can send to a joint */
} eOmc_joint_t; EO_VERIFYsizeof(eOmc_joint_t, 344);
} eOmc_joint_t; EO_VERIFYsizeof(eOmc_joint_t, 380);



Expand Down
2 changes: 1 addition & 1 deletion eth/embobj/plus/comm-v2/protocol/api/EoProtocolMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extern "C" {
// - declaration of public user-defined types -------------------------------------------------------------------------


enum { eoprot_version_mc_major = 1, eoprot_version_mc_minor = 24 };
enum { eoprot_version_mc_major = 1, eoprot_version_mc_minor = 25 };

enum { eoprot_entities_mc_numberof = eomc_entities_numberof };

Expand Down