24 using mavlink::common::MAV_SENSOR_ORIENTATION;
35 constexpr
auto DEG_TO_RAD = (M_PI / 180.0);
37 return std::make_pair(name, rot);
123 std::string
to_string(MAV_SENSOR_ORIENTATION orientation)
137 const auto idx =
static_cast<std::underlying_type<MAV_SENSOR_ORIENTATION>::type
>(orientation);
140 return Eigen::Quaterniond::Identity();
159 int idx = std::stoi(sensor_orientation, 0, 0);
161 ROS_ERROR_NAMED(
"uas",
"SENSOR: orientation index out of bound: %d", idx);
167 catch (std::invalid_argument &ex) {
#define ROS_ERROR_STREAM_NAMED(name, args)
std::string to_string(MAV_SENSOR_ORIENTATION orientation)
Eigen::Quaterniond sensor_orientation_matching(mavlink::common::MAV_SENSOR_ORIENTATION orientation)
Function to match the received orientation received by MAVLink msg and the rotation of the sensor rel...
static const std::array< const OrientationPair, 42 > sensor_orientations
static const OrientationPair make_orientation(const std::string &name, const double roll, const double pitch, const double yaw)
std::string to_string(timesync_mode e)
std::pair< const std::string, const Eigen::Quaterniond > OrientationPair
Eigen::Quaterniond quaternion_from_rpy(const Eigen::Vector3d &rpy)
Convert euler angles to quaternion.
int sensor_orientation_from_str(const std::string &sensor_orientation)
Retrieve sensor orientation number from alias name.
#define ROS_ERROR_NAMED(name,...)
Frame transformation utilities.
constexpr std::underlying_type< _T >::type enum_value(_T e)