mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 20:33:35 +08:00
simulator_ignition_bridge: fix double promotions
This commit is contained in:
@@ -76,14 +76,14 @@ int SimulatorIgnitionBridge::init()
|
|||||||
if (!_model_pose.empty()) {
|
if (!_model_pose.empty()) {
|
||||||
PX4_INFO("Requested Model Position: %s", _model_pose.c_str());
|
PX4_INFO("Requested Model Position: %s", _model_pose.c_str());
|
||||||
|
|
||||||
std::vector<float> model_pose_v;
|
std::vector<double> model_pose_v;
|
||||||
|
|
||||||
std::stringstream ss(_model_pose);
|
std::stringstream ss(_model_pose);
|
||||||
|
|
||||||
while (ss.good()) {
|
while (ss.good()) {
|
||||||
std::string substr;
|
std::string substr;
|
||||||
std::getline(ss, substr, ',');
|
std::getline(ss, substr, ',');
|
||||||
model_pose_v.push_back(std::stof(substr));
|
model_pose_v.push_back(std::stod(substr));
|
||||||
}
|
}
|
||||||
|
|
||||||
while (model_pose_v.size() < 6) {
|
while (model_pose_v.size() < 6) {
|
||||||
|
|||||||
Reference in New Issue
Block a user