-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'sugihara-16/develop/gimbal_rotor' into …
…PR/birotor
- Loading branch information
Showing
135 changed files
with
23,519 additions
and
413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
rosrun aerial_robot_base rosbag_raw_sensors.sh $1 rosout rosout_agg $1/four_axes/command $1/rpy/pid $1/rpy/gain $1/debug/pose/pid $1/desire_coordinate $1/flight_config_cmd $1/kf/imu1/data $1/kf/alt1/data $1/kf/gps1/data $1/kf/mocap1/data $1/kf/vo1/data $1/ground_truth $1/debug/four_axes/gain $1/motor_info $1/p_matrix_pseudo_inverse_inertia $1/servo/torque_enable $1/servo/target_states /tf_static /tf $1/uav/baselink/odom $1/uav/cog/odom $1/uav/full_state $1/uav_info $1/uav_power $1/uav/nav $1/joints_ctrl $1/joint_states ${@:2} | ||
rosrun aerial_robot_base rosbag_raw_sensors.sh $1 rosout rosout_agg $1/four_axes/command $1/rpy/pid $1/rpy/gain $1/debug/pose/pid $1/desire_coordinate $1/flight_config_cmd $1/kf/imu1/data $1/kf/alt1/data $1/kf/gps1/data $1/kf/mocap1/data $1/kf/vo1/data $1/ground_truth $1/debug/four_axes/gain $1/motor_info $1/p_matrix_pseudo_inverse_inertia $1/servo/torque_enable $1/servo/target_states /tf_static /tf $1/uav/baselink/odom $1/uav/cog/odom $1/uav/full_state $1/uav_info $1/uav_power $1/uav/nav $1/joints_ctrl $1/joint_states $1/joy ${@:2} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
sensor_plugin: | ||
vo: | ||
vo_sub_topic_name: Odometry_precede | ||
level_pos_noise_sigma: 0.01 # 0.01 is better that 0.001 | ||
z_pos_noise_sigma: 0.01 # 0.01 is better than 0.001 | ||
z_vel_mode: false | ||
vel_noise_sigma: 0.01 # TODO: modification | ||
sensor_frame: lidar_imu | ||
reference_frame: fc | ||
vio_mode: true | ||
local_vel_mode: false # the twist/twist/velocity is described in global frame | ||
time_sync: false | ||
reset_duration: 0.5 | ||
|
||
fusion_mode: 2 # ONLY_POS_MODE = 0, ONLY_VEL_MODE = 1, POS_VEL_MODE = 2 | ||
#param_verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
aerial_robot_control/include/aerial_robot_control/trajectory/base/module.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
|
||
#include "aerial_robot_control/trajectory/utils/logger.hpp" | ||
|
||
namespace agi { | ||
|
||
template<typename Derived> | ||
class Module { | ||
public: | ||
Module(const std::string& name) : logger_(name) {} | ||
virtual ~Module() {} | ||
|
||
inline const std::string& name() const { return logger_.name(); } | ||
virtual void logTiming() const {}; | ||
|
||
protected: | ||
Logger logger_; | ||
}; | ||
|
||
} // namespace agi |
31 changes: 31 additions & 0 deletions
31
aerial_robot_control/include/aerial_robot_control/trajectory/base/parameter_base.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#pragma once | ||
|
||
#include <aerial_robot_control/trajectory/utils/filesystem.hpp> | ||
#include <exception> | ||
#include <sstream> | ||
|
||
#include "aerial_robot_control/trajectory/math/types.hpp" | ||
#include "aerial_robot_control/trajectory/utils/filesystem.hpp" | ||
#include "aerial_robot_control/trajectory/utils/yaml.hpp" | ||
|
||
namespace agi { | ||
|
||
|
||
struct ParameterException : public std::exception { | ||
ParameterException() = default; | ||
ParameterException(const std::string& msg) | ||
: msg(std::string("Dodgelib Parameter Exception: ") + msg) {} | ||
const char* what() const throw() { return msg.c_str(); } | ||
|
||
const std::string msg{"Dodgelib Parameter Exception"}; | ||
}; | ||
|
||
struct ParameterBase { | ||
virtual ~ParameterBase() = default; | ||
virtual bool load(const fs::path& filename); | ||
virtual bool load(const Yaml& yaml); | ||
|
||
virtual bool valid() const; | ||
}; | ||
|
||
} // namespace agi |
22 changes: 22 additions & 0 deletions
22
aerial_robot_control/include/aerial_robot_control/trajectory/math/gravity.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
#include "aerial_robot_control/trajectory/math/types.hpp" | ||
|
||
namespace agi { | ||
|
||
/** | ||
* Gravity Value [m/s^2] | ||
* | ||
* This is the gravity value used in the whole project. | ||
*/ | ||
static constexpr Scalar G = 9.8066; | ||
|
||
|
||
/** | ||
* Gravity Vector [m/s^2] | ||
* | ||
* This is the gravity vector pointing in negative z-direction. | ||
* It uses the value of #G. | ||
*/ | ||
const Vector<3> GVEC{0, 0, -G}; | ||
|
||
} // namespace agi |
47 changes: 47 additions & 0 deletions
47
aerial_robot_control/include/aerial_robot_control/trajectory/math/math.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#pragma once | ||
|
||
#include <aerial_robot_control/trajectory/math/types.hpp> | ||
|
||
namespace agi { | ||
|
||
Matrix<3, 3> skew(const Vector<3>& v); | ||
|
||
Matrix<4, 4> Q_left(const Quaternion& q); | ||
|
||
Matrix<4, 4> Q_right(const Quaternion& q); | ||
|
||
Matrix<4, 3> qFromQeJacobian(const Quaternion& q); | ||
|
||
Matrix<4, 4> qConjugateJacobian(); | ||
|
||
Matrix<3, 3> qeRotJacobian(const Quaternion& q, const Matrix<3, 1>& t); | ||
|
||
Matrix<3, 3> qeInvRotJacobian(const Quaternion& q, const Matrix<3, 1>& t); | ||
|
||
void matrixToTripletList(const SparseMatrix& matrix, | ||
std::vector<SparseTriplet>* const list, | ||
const int row_offset = 0, const int col_offset = 0); | ||
|
||
void matrixToTripletList(const Matrix<>& matrix, | ||
std::vector<SparseTriplet>* const list, | ||
const int row_offset = 0, const int col_offset = 0); | ||
|
||
void insert(const SparseMatrix& from, SparseMatrix* const into, | ||
const int row_offset = 0, const int col_offset = 0); | ||
|
||
void insert(const Matrix<>& from, SparseMatrix* const into, | ||
const int row_offset = 0, const int col_offset = 0); | ||
|
||
void insert(const Matrix<>& from, Matrix<>* const into, | ||
const int row_offset = 0, const int col_offset = 0); | ||
|
||
Vector<> clip(const Vector<>& v, const Vector<>& bound); | ||
|
||
inline constexpr Scalar toRad(const Scalar angle_deg) { | ||
return angle_deg * M_PI / 180.0; | ||
} | ||
inline constexpr Scalar toDeg(const Scalar angle_deg) { | ||
return angle_deg / M_PI * 180.0; | ||
} | ||
|
||
} // namespace agi |
Oops, something went wrong.