26 static const std::array<std::string, 5>
MOTOR_NAMES = {
"motor0",
"motor1",
"motor2",
"motor3",
"ICE"};
37 if (uavDynamicsSim_ ==
nullptr) {
71 const Eigen::Vector3d MOMENT_COLOR(0.5, 0.5, 0.0);
72 const Eigen::Vector3d MOTORS_FORCES_COLOR(0.0, 0.5, 0.5);
73 const Eigen::Vector3d SPEED_COLOR(0.7, 0.5, 1.3);
74 const Eigen::Vector3d LIFT_FORCE(0.8, 0.2, 0.3);
75 const Eigen::Vector3d DRAG_FORCE(0.2, 0.8, 0.3);
76 const Eigen::Vector3d SIDE_FORCE(0.2, 0.3, 0.8);
84 for(
size_t motorIdx = 0; motorIdx < 5; motorIdx++){
101 for(
size_t motorIdx = 0; motorIdx < 5; motorIdx++){
118 const Eigen::Vector3d& rgbColor,
142 geometry_msgs::Point startPoint;
148 geometry_msgs::Point endPoint;
159 geometry_msgs::TransformStamped transform;
165 Eigen::Vector3d enuPosition;
166 Eigen::Quaterniond fluAttitude;
171 enuPosition = position;
172 fluAttitude = attitude;
175 transform.transform.translation.x = enuPosition[0];
176 transform.transform.translation.y = enuPosition[1];
177 transform.transform.translation.z = enuPosition[2];
178 transform.transform.rotation.x = fluAttitude.x();
179 transform.transform.rotation.y = fluAttitude.y();
180 transform.transform.rotation.z = fluAttitude.z();
181 transform.transform.rotation.w = fluAttitude.w();
185 transform.transform.rotation.x = 0;
186 transform.transform.rotation.y = 0;
187 transform.transform.rotation.z = 0;
188 transform.transform.rotation.w = 1;