Skip to content

Commit 4a51499

Browse files
authored
Merge pull request #23 from ori-drs/tuning/kinematics
Tuning/kinematics
2 parents 73481a6 + 64c6d13 commit 4a51499

File tree

27 files changed

+289
-569
lines changed

27 files changed

+289
-569
lines changed

filter_tools/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package>
33
<name>filter_tools</name>
4-
<version>0.0.0</version>
4+
<version>0.1.0</version>
55
<description>Description</description>
66
<maintainer email="mfallon@robots.ox.ac.uk">Maurice Fallon</maintainer>
77
<author email="mfallon@robots.ox.ac.uk">Maurice Fallon</author>

pronto_biped_core/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package format="2">
33
<name>pronto_biped_core</name>
4-
<version>0.0.1</version>
4+
<version>0.1.0</version>
55

66
<description>Description</description>
77
<maintainer email="mfallon@robots.ox.ac.uk">Maurice Fallon</maintainer>

pronto_biped_ros/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package format="2">
33
<name>pronto_biped_ros</name>
4-
<version>0.0.0</version>
4+
<version>0.1.0</version>
55
<description>The pronto_biped_ros package</description>
66

77
<!-- One maintainer tag required, multiple allowed, one person per tag -->

pronto_core/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package>
33
<name>pronto_core</name>
4-
<version>0.0.1</version>
4+
<version>0.1.0</version>
55
<description>
66
The pronto_core package contains the EKF and the main
77
modules to perform state estimation, including: inertial, gps, optical

pronto_msgs/CMakeLists.txt

Lines changed: 3 additions & 179 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,8 @@
11
cmake_minimum_required(VERSION 3.0.2)
22
project(pronto_msgs)
33

4-
set(CMAKE_CXX_STANDARD 14)
5-
6-
## Find catkin macros and libraries
7-
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
8-
## is used, also find other catkin packages
94
find_package(catkin REQUIRED roscpp rospy std_msgs geometry_msgs message_generation)
105

11-
## System dependencies are found with CMake's conventions
12-
# find_package(Boost REQUIRED COMPONENTS system)
13-
14-
15-
## Uncomment this if the package has a setup.py. This macro ensures
16-
## modules and global scripts declared therein get installed
17-
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
18-
# catkin_python_setup()
19-
20-
################################################
21-
## Declare ROS messages, services and actions ##
22-
################################################
23-
24-
## To declare and build messages, services or actions from within this
25-
## package, follow these steps:
26-
## * Let MSG_DEP_SET be the set of packages whose message types you use in
27-
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
28-
## * In the file package.xml:
29-
## * add a build_depend tag for "message_generation"
30-
## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
31-
## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
32-
## but can be declared for certainty nonetheless:
33-
## * add a exec_depend tag for "message_runtime"
34-
## * In this file (CMakeLists.txt):
35-
## * add "message_generation" and every package in MSG_DEP_SET to
36-
## find_package(catkin REQUIRED COMPONENTS ...)
37-
## * add "message_runtime" and every package in MSG_DEP_SET to
38-
## catkin_package(CATKIN_DEPENDS ...)
39-
## * uncomment the add_*_files sections below as needed
40-
## and list every .msg/.srv/.action file to be processed
41-
## * uncomment the generate_messages entry below
42-
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
43-
44-
## Generate messages in the 'msg' folder
456
add_message_files(FILES VisualOdometryUpdate.msg
467
FilterState.msg
478
GPSData.msg
@@ -50,146 +11,9 @@ add_message_files(FILES VisualOdometryUpdate.msg
5011
LidarOdometryUpdate.msg
5112
ControllerFootContact.msg
5213
BipedForceTorqueSensors.msg
53-
QuadrupedForceTorqueSensors.msg)
54-
55-
## Generate services in the 'srv' folder
56-
# add_service_files(
57-
# FILES
58-
# Service1.srv
59-
# Service2.srv
60-
# )
14+
QuadrupedForceTorqueSensors.msg
15+
VelocityWithSigmaBounds.msg)
6116

62-
## Generate actions in the 'action' folder
63-
# add_action_files(
64-
# FILES
65-
# Action1.action
66-
# Action2.action
67-
# )
68-
69-
## Generate added messages and services with any dependencies listed here
7017
generate_messages(DEPENDENCIES std_msgs geometry_msgs)
7118

72-
################################################
73-
## Declare ROS dynamic reconfigure parameters ##
74-
################################################
75-
76-
## To declare and build dynamic reconfigure parameters within this
77-
## package, follow these steps:
78-
## * In the file package.xml:
79-
## * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
80-
## * In this file (CMakeLists.txt):
81-
## * add "dynamic_reconfigure" to
82-
## find_package(catkin REQUIRED COMPONENTS ...)
83-
## * uncomment the "generate_dynamic_reconfigure_options" section below
84-
## and list every .cfg file to be processed
85-
86-
## Generate dynamic reconfigure parameters in the 'cfg' folder
87-
# generate_dynamic_reconfigure_options(
88-
# cfg/DynReconf1.cfg
89-
# cfg/DynReconf2.cfg
90-
# )
91-
92-
###################################
93-
## catkin specific configuration ##
94-
###################################
95-
## The catkin_package macro generates cmake config files for your package
96-
## Declare things to be passed to dependent projects
97-
## INCLUDE_DIRS: uncomment this if your package contains header files
98-
## LIBRARIES: libraries you create in this project that dependent projects also need
99-
## CATKIN_DEPENDS: catkin_packages dependent projects also need
100-
## DEPENDS: system dependencies of this project that dependent projects also need
101-
catkin_package(
102-
# INCLUDE_DIRS include
103-
# LIBRARIES pronto_msgs
104-
CATKIN_DEPENDS message_runtime std_msgs geometry_msgs
105-
# DEPENDS system_lib
106-
)
107-
108-
###########
109-
## Build ##
110-
###########
111-
112-
## Specify additional locations of header files
113-
## Your package locations should be listed before other locations
114-
include_directories(
115-
# include
116-
# ${catkin_INCLUDE_DIRS}
117-
)
118-
119-
## Declare a C++ library
120-
# add_library(${PROJECT_NAME}
121-
# src/${PROJECT_NAME}/pronto_msgs.cpp
122-
# )
123-
124-
## Add cmake target dependencies of the library
125-
## as an example, code may need to be generated before libraries
126-
## either from message generation or dynamic reconfigure
127-
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
128-
129-
## Declare a C++ executable
130-
## With catkin_make all packages are built within a single CMake context
131-
## The recommended prefix ensures that target names across packages don't collide
132-
# add_executable(${PROJECT_NAME}_node src/pronto_msgs_node.cpp)
133-
134-
## Rename C++ executable without prefix
135-
## The above recommended prefix causes long target names, the following renames the
136-
## target back to the shorter version for ease of user use
137-
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
138-
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
139-
140-
## Add cmake target dependencies of the executable
141-
## same as for the library above
142-
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
143-
144-
## Specify libraries to link a library or executable target against
145-
# target_link_libraries(${PROJECT_NAME}_node
146-
# ${catkin_LIBRARIES}
147-
# )
148-
149-
#############
150-
## Install ##
151-
#############
152-
153-
# all install targets should use catkin DESTINATION variables
154-
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
155-
156-
## Mark executable scripts (Python etc.) for installation
157-
## in contrast to setup.py, you can choose the destination
158-
# install(PROGRAMS
159-
# scripts/my_python_script
160-
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
161-
# )
162-
163-
## Mark executables and/or libraries for installation
164-
# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node
165-
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
166-
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
167-
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
168-
# )
169-
170-
## Mark cpp header files for installation
171-
# install(DIRECTORY include/${PROJECT_NAME}/
172-
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
173-
# FILES_MATCHING PATTERN "*.h"
174-
# PATTERN ".svn" EXCLUDE
175-
# )
176-
177-
## Mark other files for installation (e.g. launch and bag files, etc.)
178-
# install(FILES
179-
# # myfile1
180-
# # myfile2
181-
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
182-
# )
183-
184-
#############
185-
## Testing ##
186-
#############
187-
188-
## Add gtest based cpp test target and link libraries
189-
# catkin_add_gtest(${PROJECT_NAME}-test test/test_pronto_msgs.cpp)
190-
# if(TARGET ${PROJECT_NAME}-test)
191-
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
192-
# endif()
193-
194-
## Add folders to be run by python nosetests
195-
# catkin_add_nosetests(test)
19+
catkin_package(CATKIN_DEPENDS message_runtime std_msgs geometry_msgs)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# convenience message encoding the linear velocity
2+
# one sigma bounds (plus, minus) and the sigma alone
3+
4+
Header header
5+
geometry_msgs/Vector3 velocity_plus_one_sigma
6+
geometry_msgs/Vector3 velocity_minus_one_sigma
7+
geometry_msgs/Vector3 plus_one_sigma
8+

pronto_msgs/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package format="2">
33
<name>pronto_msgs</name>
4-
<version>0.0.0</version>
4+
<version>0.1.0</version>
55

66
<description>
77
The pronto_msgs package contains common message types used by the

pronto_quadruped/include/pronto_quadruped/DynamicStanceEstimator.hpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015-2019
1+
/* Copyright (c) 2015-2021
22
* Istituto Italiano di Tecnologia (IIT), University of Oxford
33
* All rights reserved.
44
*
@@ -36,14 +36,9 @@
3636
namespace pronto {
3737
namespace quadruped {
3838

39-
typedef typename pronto::quadruped::FeetJacobians FeetJacobians;
40-
typedef typename pronto::quadruped::FeetContactForces FeetContactForces;
41-
typedef typename pronto::quadruped::InverseDynamicsBase InverseDynamics;
42-
typedef typename pronto::quadruped::JSIMBase JSIM;
43-
typedef typename pronto::quadruped::LegDataMap<Eigen::Vector3d> LegVector3Map;
44-
typedef typename pronto::quadruped::LegDataMap<double> LegScalarMap;
45-
typedef typename pronto::quadruped::ForwardKinematics ForwardKinematics;
46-
39+
using InverseDynamics = InverseDynamicsBase;
40+
using JSIM = JSIMBase ;
41+
using LegScalarMap = LegDataMap<double>;
4742
using Wrench = iit::rbd::ForceVector;
4843

4944
/**

pronto_quadruped/include/pronto_quadruped/LegOdometer.hpp

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015-2019
1+
/* Copyright (c) 2015-2021
22
* Istituto Italiano di Tecnologia (IIT), University of Oxford
33
* All rights reserved.
44
*
@@ -36,6 +36,7 @@
3636

3737
// iit-commons
3838
#include <pronto_quadruped_commons/leg_data_map.h>
39+
#include <pronto_quadruped_commons/leg_vector_map.h>
3940
#include <pronto_quadruped_commons/forward_kinematics.h>
4041
#include <pronto_quadruped_commons/feet_jacobians.h>
4142

@@ -45,11 +46,6 @@
4546
namespace pronto {
4647
namespace quadruped {
4748

48-
using pronto::quadruped::LF;
49-
using pronto::quadruped::RF;
50-
using pronto::quadruped::LH;
51-
using pronto::quadruped::RH;
52-
5349
/**
5450
* @brief The LegOdometer class computes the velocity of a floating base
5551
* legged robot given its joint state, the stance feet, and other data.
@@ -59,12 +55,6 @@ class LegOdometer : public LegOdometerBase {
5955
template <class T>
6056
using LegDataMap = pronto::quadruped::LegDataMap<T>;
6157

62-
typedef typename pronto::quadruped::FeetJacobians FeetJacobians;
63-
typedef typename pronto::quadruped::ForwardKinematics ForwardKinematics;
64-
typedef typename pronto::quadruped::JointState JointState;
65-
typedef typename pronto::quadruped::LegBoolMap LegBoolMap;
66-
typedef typename pronto::quadruped::LegDataMap<Eigen::Vector3d> LegVector3Map;
67-
6858
enum class SigmaMode {STATIC_SIGMA = 0,/*!< use constant covariance */
6959
VAR_SIGMA, /*!< compute covariance from stance legs */
7060
IMPACT_SIGMA, /*!< compute covariance from impact information */
@@ -84,16 +74,16 @@ class LegOdometer : public LegOdometerBase {
8474

8575

8676
public:
87-
inline bool estimatePose(const uint64_t utime,
77+
bool estimatePose(const uint64_t utime,
8878
const JointState& q,
8979
const LegBoolMap& stance_legs,
9080
const LegScalarMap& stance_prob,
9181
Vector3d& position,
9282
Matrix3d& pos_covariance,
9383
Quaterniond& orientation,
9484
Matrix3d& orient_covariance) override {
95-
std::cerr << "Function not implemented yet!" << std::endl;
96-
return false;
85+
std::cerr << "Function not implemented yet!" << std::endl;
86+
return false;
9787
}
9888

9989
bool estimateVelocity(const uint64_t utime,
@@ -105,16 +95,16 @@ class LegOdometer : public LegOdometerBase {
10595
Vector3d& velocity,
10696
Matrix3d& covariance) override;
10797

108-
inline void getVelocity(Vector3d& velocity, Matrix3d& covariance) override
98+
void getVelocity(Vector3d& velocity, Matrix3d& covariance) override
10999
{
110100
velocity = xd_b_;
111101
covariance = vel_cov_;
112102
}
113-
inline void getPosition(Vector3d& position, Matrix3d& covariance) override
103+
void getPosition(Vector3d& position, Matrix3d& covariance) override
114104
{
115105
std::cerr << "Function not implemented yet!" << std::endl;
116106
}
117-
inline void getOrientation(Quaterniond& orientation, Matrix3d& covariance) override
107+
void getOrientation(Quaterniond& orientation, Matrix3d& covariance) override
118108
{
119109
std::cerr << "Function not implemented yet!" << std::endl;
120110
}
@@ -128,9 +118,9 @@ class LegOdometer : public LegOdometerBase {
128118
virtual void setGrfDelta(const LegScalarMap& grf_delta);
129119

130120
// Debugging methods
131-
void getVelocitiesFromLegs(LegVector3Map & vd) override;
132-
void getFeetPositions(LegVector3Map & jd) override;
133-
virtual LegVector3Map getFootPos();
121+
void getVelocitiesFromLegs(LegVectorMap & vd) override;
122+
void getFeetPositions(LegVectorMap & jd) override;
123+
virtual LegVectorMap getFootPos();
134124

135125

136126
void setInitVelocityCov(const Matrix3d& vel_cov) override;
@@ -140,6 +130,9 @@ class LegOdometer : public LegOdometerBase {
140130

141131
// Configuration methods
142132
virtual void setMode(const SigmaMode s_mode, const AverageMode a_mode);
133+
virtual void getMode(SigmaMode& s_mode, AverageMode& a_mode);
134+
virtual std::string printMode();
135+
void setSpeedLimit(const double& limit) override;
143136

144137
protected:
145138
FeetJacobians& feet_jacobians_;
@@ -165,14 +158,15 @@ class LegOdometer : public LegOdometerBase {
165158
* kinematics.
166159
* <b>NOTE</b>: these are NOT the velocity of the legs.
167160
*/
168-
LegVector3Map base_vel_leg_;
169-
LegVector3Map foot_pos_;
161+
LegVectorMap base_vel_leg_;
162+
LegVectorMap foot_pos_;
170163

171164
Eigen::Vector3d xd_b_; // estimated velocity, base frame
172-
Eigen::Vector3d old_xd_b_; // previous estimated velocity, base frame
173165

174166
Eigen::Array4d grf_delta_;
175167
Eigen::Array4d grf_;
168+
169+
double speed_limit_; // upper limit of the absolute norm of the linear velocity
176170
};
177171
} // namespace quadruped
178172
} // namespace pronto

0 commit comments

Comments
 (0)