From 1991185a424a5e87c5f0646791b305a2436c4dee Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 1 Jun 2021 16:27:06 -0300 Subject: [PATCH 1/5] GazeboDrone project added to connect a gazebo drone to the AirSim drone --- GazeboDrone/CMakeLists.txt | 39 ++++++++++ GazeboDrone/README.md | 47 +++++++++++++ GazeboDrone/src/main.cpp | 141 +++++++++++++++++++++++++++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 GazeboDrone/CMakeLists.txt create mode 100644 GazeboDrone/README.md create mode 100644 GazeboDrone/src/main.cpp diff --git a/GazeboDrone/CMakeLists.txt b/GazeboDrone/CMakeLists.txt new file mode 100644 index 0000000000..4142f789b4 --- /dev/null +++ b/GazeboDrone/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required(VERSION 2.8 FATAL_ERROR) + +project(GazeboDrone) + +set(AIRSIM_ROOT ..) +set(CMAKE_CXX_COMPILER /usr/bin/g++) + +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 11) +endif() + +find_package(gazebo REQUIRED) + +include_directories( + ${GAZEBO_INCLUDE_DIRS} + ${AIRSIM_ROOT}/AirLib/deps/eigen3 + ${AIRSIM_ROOT}/AirLib/deps/rpclib/include + ${AIRSIM_ROOT}/AirLib/include + ${AIRSIM_ROOT}/AirLib/deps/MavLinkCom/include +) + +link_directories( + ${GAZEBO_LIBRARY_DIRS} + ../../AirLib/lib/x64 +) + +list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}") + +add_executable(${PROJECT_NAME} src/main.cpp) + +target_link_libraries( + ${PROJECT_NAME} + ${GAZEBO_LIBRARIES} + pthread + AirLib + rpc + MavLinkCom +) + diff --git a/GazeboDrone/README.md b/GazeboDrone/README.md new file mode 100644 index 0000000000..2acf8185ac --- /dev/null +++ b/GazeboDrone/README.md @@ -0,0 +1,47 @@ +# General + +Derived from http://gazebosim.org/tutorials?tut=topics_subscribed + +Make sure you have installed gazebo dependencies + +``` +sudo apt-get install libgazebo9-dev +``` + +# AirLib build + +This project is built with g++, so AirLib needs to be built with g++ too. Change lines 56 and 57 of AirSim/build.sh with: +``` +export CC="gcc-8" +export CXX="g++-8" +``` +then run ./setup.sh and ./build.sh + +# AirSim plugin + +The AirSim UE plugin needs to be built with clang. You can clone AirSim again in another folder without the above change, and from that one, run the Blocks environment. + + +# AirSim settings + +Inside your `settings.json` file add this line: +`"PhysicsEngineName":"ExternalPhysicsEngine"` +# Build + +``` +mkdir build && cd build +cmake .. +make +``` + +# Run + +Run AirSim and Gazebo + +then run: + +``` +cd build +./GazeboDrone +``` + diff --git a/GazeboDrone/src/main.cpp b/GazeboDrone/src/main.cpp new file mode 100644 index 0000000000..8a6f3f1daf --- /dev/null +++ b/GazeboDrone/src/main.cpp @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2012 Open Source Robotics Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * +*/ + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#include +#include +#include +#include "common/common_utils/StrictMode.hpp" +STRICT_MODE_OFF +#ifndef RPCLIB_MSGPACK +#define RPCLIB_MSGPACK clmdep_msgpack +#endif // !RPCLIB_MSGPACK +#include "rpc/rpc_error.h" +STRICT_MODE_ON + +#include "vehicles/multirotor/api/MultirotorRpcLibClient.hpp" +#include + + + +#include + +constexpr int NWIDTH = 7; +static constexpr int MESSAGE_THROTTLE = 100; + +using namespace msr::airlib; + +msr::airlib::MultirotorRpcLibClient client; + + +void cbLocalPose(ConstPosesStampedPtr &_msg) { + std::cout << std::fixed; + std::cout << std::setprecision(3); + static int count = 0; + for ( int i = 0; i < _msg->pose_size(); i++ ) { + auto x = _msg->pose(i).position().x(); + auto y = _msg->pose(i).position().y(); + auto z = _msg->pose(i).position().z(); + auto ow = _msg->pose(i).orientation().w(); + auto ox = _msg->pose(i).orientation().x(); + auto oy = _msg->pose(i).orientation().y(); + auto oz = _msg->pose(i).orientation().z(); + if(count % MESSAGE_THROTTLE == 0){ + std::cout << "local (" << std::setw(2) << i << ") "; + std::cout << std::left << std::setw(32) << _msg->pose(i).name(); + std::cout << " x: " << std::right << std::setw(NWIDTH) << x; + std::cout << " y: " << std::right << std::setw(NWIDTH) << y; + std::cout << " z: " << std::right << std::setw(NWIDTH) << z; + + std::cout << " ow: " << std::right << std::setw(NWIDTH) << ow; + std::cout << " ox: " << std::right << std::setw(NWIDTH) << ox; + std::cout << " oy: " << std::right << std::setw(NWIDTH) << oy; + std::cout << " oz: " << std::right << std::setw(NWIDTH) << oz; + std::cout << std::endl; + } + if( i == _msg->pose_size()-1 ){ + msr::airlib::Vector3r p; + msr::airlib::Quaternionr o; + p.x() = x; + p.y() = -y; + p.z() = -z; + o.w() = ow; + o.x() = ox; + o.y() = -oy; + o.z() = -oz; + client.simSetVehiclePose(Pose(p,o), true); + } + + } + if(count % MESSAGE_THROTTLE == 0){ + std::cout << std::endl; + } + + ++count; +} + +void cbGobalPose(ConstPosesStampedPtr &_msg) { + std::cout << std::fixed; + std::cout << std::setprecision(4); + static int count = 0; + if(count % MESSAGE_THROTTLE){ + ++count; + return; + } + ++count; + + for ( int i = 0; i < _msg->pose_size(); i++ ) { + std::cout << "global (" << i << ") "; + std::cout << std::left << std::setw(32) << _msg->pose(i).name(); + std::cout << " x: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().x(); + std::cout << " y: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().y(); + std::cout << " z: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().z(); + + std::cout << " ow: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().w(); + std::cout << " ox: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().x(); + std::cout << " oy: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().y(); + std::cout << " oz: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().z(); + std::cout << std::endl; + } + std::cout << std::endl; +} + +int main(int _argc, char **_argv) { + + + client.confirmConnection(); + + // Load gazebo + gazebo::client::setup(_argc, _argv); + + // Create our node for communication + gazebo::transport::NodePtr node(new gazebo::transport::Node()); + node->Init(); + + // Listen to Gazebo topics + gazebo::transport::SubscriberPtr subPose1 = node->Subscribe("~/pose/local/info", cbLocalPose); + gazebo::transport::SubscriberPtr subPose2 = node->Subscribe("~/pose/info", cbGobalPose); + + // Busy wait loop...replace with your own code as needed. + while (true) + gazebo::common::Time::MSleep(10); + + // Make sure to shut everything down. + gazebo::client::shutdown(); +} From 77d599bc6c6bf69f400210d7679a42562282e5ce Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 1 Jun 2021 16:39:57 -0300 Subject: [PATCH 2/5] style changes --- GazeboDrone/src/main.cpp | 164 +++++++++++++++++++-------------------- 1 file changed, 81 insertions(+), 83 deletions(-) diff --git a/GazeboDrone/src/main.cpp b/GazeboDrone/src/main.cpp index 8a6f3f1daf..164d36b35e 100644 --- a/GazeboDrone/src/main.cpp +++ b/GazeboDrone/src/main.cpp @@ -32,8 +32,6 @@ STRICT_MODE_ON #include "vehicles/multirotor/api/MultirotorRpcLibClient.hpp" #include - - #include constexpr int NWIDTH = 7; @@ -43,99 +41,99 @@ using namespace msr::airlib; msr::airlib::MultirotorRpcLibClient client; - -void cbLocalPose(ConstPosesStampedPtr &_msg) { - std::cout << std::fixed; - std::cout << std::setprecision(3); - static int count = 0; - for ( int i = 0; i < _msg->pose_size(); i++ ) { - auto x = _msg->pose(i).position().x(); - auto y = _msg->pose(i).position().y(); - auto z = _msg->pose(i).position().z(); - auto ow = _msg->pose(i).orientation().w(); - auto ox = _msg->pose(i).orientation().x(); - auto oy = _msg->pose(i).orientation().y(); - auto oz = _msg->pose(i).orientation().z(); - if(count % MESSAGE_THROTTLE == 0){ - std::cout << "local (" << std::setw(2) << i << ") "; - std::cout << std::left << std::setw(32) << _msg->pose(i).name(); - std::cout << " x: " << std::right << std::setw(NWIDTH) << x; - std::cout << " y: " << std::right << std::setw(NWIDTH) << y; - std::cout << " z: " << std::right << std::setw(NWIDTH) << z; - - std::cout << " ow: " << std::right << std::setw(NWIDTH) << ow; - std::cout << " ox: " << std::right << std::setw(NWIDTH) << ox; - std::cout << " oy: " << std::right << std::setw(NWIDTH) << oy; - std::cout << " oz: " << std::right << std::setw(NWIDTH) << oz; - std::cout << std::endl; - } - if( i == _msg->pose_size()-1 ){ - msr::airlib::Vector3r p; - msr::airlib::Quaternionr o; - p.x() = x; +void cbLocalPose(ConstPosesStampedPtr& _msg) +{ + std::cout << std::fixed; + std::cout << std::setprecision(3); + static int count = 0; + for (int i = 0; i < _msg->pose_size(); i++) { + auto x = _msg->pose(i).position().x(); + auto y = _msg->pose(i).position().y(); + auto z = _msg->pose(i).position().z(); + auto ow = _msg->pose(i).orientation().w(); + auto ox = _msg->pose(i).orientation().x(); + auto oy = _msg->pose(i).orientation().y(); + auto oz = _msg->pose(i).orientation().z(); + if (count % MESSAGE_THROTTLE == 0) { + std::cout << "local (" << std::setw(2) << i << ") "; + std::cout << std::left << std::setw(32) << _msg->pose(i).name(); + std::cout << " x: " << std::right << std::setw(NWIDTH) << x; + std::cout << " y: " << std::right << std::setw(NWIDTH) << y; + std::cout << " z: " << std::right << std::setw(NWIDTH) << z; + + std::cout << " ow: " << std::right << std::setw(NWIDTH) << ow; + std::cout << " ox: " << std::right << std::setw(NWIDTH) << ox; + std::cout << " oy: " << std::right << std::setw(NWIDTH) << oy; + std::cout << " oz: " << std::right << std::setw(NWIDTH) << oz; + std::cout << std::endl; + } + if (i == _msg->pose_size() - 1) { + msr::airlib::Vector3r p; + msr::airlib::Quaternionr o; + p.x() = x; p.y() = -y; - p.z() = -z; - o.w() = ow; - o.x() = ox; - o.y() = -oy; - o.z() = -oz; - client.simSetVehiclePose(Pose(p,o), true); + p.z() = -z; + o.w() = ow; + o.x() = ox; + o.y() = -oy; + o.z() = -oz; + client.simSetVehiclePose(Pose(p, o), true); + } } - - } - if(count % MESSAGE_THROTTLE == 0){ - std::cout << std::endl; - } - - ++count; + if (count % MESSAGE_THROTTLE == 0) { + std::cout << std::endl; + } + + ++count; } -void cbGobalPose(ConstPosesStampedPtr &_msg) { - std::cout << std::fixed; - std::cout << std::setprecision(4); - static int count = 0; - if(count % MESSAGE_THROTTLE){ +void cbGobalPose(ConstPosesStampedPtr& _msg) +{ + std::cout << std::fixed; + std::cout << std::setprecision(4); + static int count = 0; + if (count % MESSAGE_THROTTLE) { + ++count; + return; + } ++count; - return; - } - ++count; - - for ( int i = 0; i < _msg->pose_size(); i++ ) { - std::cout << "global (" << i << ") "; - std::cout << std::left << std::setw(32) << _msg->pose(i).name(); - std::cout << " x: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().x(); - std::cout << " y: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().y(); - std::cout << " z: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().z(); - - std::cout << " ow: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().w(); - std::cout << " ox: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().x(); - std::cout << " oy: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().y(); - std::cout << " oz: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().z(); + + for (int i = 0; i < _msg->pose_size(); i++) { + std::cout << "global (" << i << ") "; + std::cout << std::left << std::setw(32) << _msg->pose(i).name(); + std::cout << " x: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().x(); + std::cout << " y: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().y(); + std::cout << " z: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().z(); + + std::cout << " ow: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().w(); + std::cout << " ox: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().x(); + std::cout << " oy: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().y(); + std::cout << " oz: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().z(); + std::cout << std::endl; + } std::cout << std::endl; - } - std::cout << std::endl; } -int main(int _argc, char **_argv) { +int main(int _argc, char** _argv) +{ - - client.confirmConnection(); + client.confirmConnection(); - // Load gazebo - gazebo::client::setup(_argc, _argv); + // Load gazebo + gazebo::client::setup(_argc, _argv); - // Create our node for communication - gazebo::transport::NodePtr node(new gazebo::transport::Node()); - node->Init(); + // Create our node for communication + gazebo::transport::NodePtr node(new gazebo::transport::Node()); + node->Init(); - // Listen to Gazebo topics - gazebo::transport::SubscriberPtr subPose1 = node->Subscribe("~/pose/local/info", cbLocalPose); - gazebo::transport::SubscriberPtr subPose2 = node->Subscribe("~/pose/info", cbGobalPose); + // Listen to Gazebo topics + gazebo::transport::SubscriberPtr subPose1 = node->Subscribe("~/pose/local/info", cbLocalPose); + gazebo::transport::SubscriberPtr subPose2 = node->Subscribe("~/pose/info", cbGobalPose); - // Busy wait loop...replace with your own code as needed. - while (true) - gazebo::common::Time::MSleep(10); + // Busy wait loop...replace with your own code as needed. + while (true) + gazebo::common::Time::MSleep(10); - // Make sure to shut everything down. - gazebo::client::shutdown(); + // Make sure to shut everything down. + gazebo::client::shutdown(); } From a73882da90e789e56f5423b073e84574b6d628b8 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 2 Jun 2021 12:46:39 -0300 Subject: [PATCH 3/5] Update README.md with the option of using binaries --- GazeboDrone/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GazeboDrone/README.md b/GazeboDrone/README.md index 2acf8185ac..1f4725d43e 100644 --- a/GazeboDrone/README.md +++ b/GazeboDrone/README.md @@ -19,7 +19,7 @@ then run ./setup.sh and ./build.sh # AirSim plugin -The AirSim UE plugin needs to be built with clang. You can clone AirSim again in another folder without the above change, and from that one, run the Blocks environment. +The AirSim UE plugin needs to be built with clang, so you can't use the one compiled in the previous step. You can use [our binaries](https://github.com/microsoft/AirSim/releases) or you can clone AirSim again in another folder without the above change, and with that one, [run Blocks](https://microsoft.github.io/AirSim/build_linux/#how-to-use-airsim) or your environment. # AirSim settings From ab5e47e0bcee30a81d18fcad9401e999163d8542 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 4 Jun 2021 16:19:36 -0300 Subject: [PATCH 4/5] Style changes 2 and new Vector3r and Quaternionr constructors --- AirLib/include/api/RpcLibAdaptorsBase.hpp | 15 ++++++ GazeboDrone/src/main.cpp | 60 ++++++++++------------- 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/AirLib/include/api/RpcLibAdaptorsBase.hpp b/AirLib/include/api/RpcLibAdaptorsBase.hpp index 9cf5cd2ec4..a49b005352 100644 --- a/AirLib/include/api/RpcLibAdaptorsBase.hpp +++ b/AirLib/include/api/RpcLibAdaptorsBase.hpp @@ -49,6 +49,13 @@ namespace airlib_rpclib { } + Vector3r(x, y, z) + { + x_val = x; + y_val = y; + z_val = z; + } + Vector3r(const msr::airlib::Vector3r& s) { x_val = s.x(); @@ -105,6 +112,14 @@ namespace airlib_rpclib { } + Quaternionr(w, x, y, z) + { + w_val = w; + x_val = x; + y_val = y; + z_val = z; + } + Quaternionr(const msr::airlib::Quaternionr& s) { w_val = s.w(); diff --git a/GazeboDrone/src/main.cpp b/GazeboDrone/src/main.cpp index 164d36b35e..7ca565b046 100644 --- a/GazeboDrone/src/main.cpp +++ b/GazeboDrone/src/main.cpp @@ -41,22 +41,22 @@ using namespace msr::airlib; msr::airlib::MultirotorRpcLibClient client; -void cbLocalPose(ConstPosesStampedPtr& _msg) +void cbLocalPose(ConstPosesStampedPtr& msg) { std::cout << std::fixed; std::cout << std::setprecision(3); static int count = 0; - for (int i = 0; i < _msg->pose_size(); i++) { - auto x = _msg->pose(i).position().x(); - auto y = _msg->pose(i).position().y(); - auto z = _msg->pose(i).position().z(); - auto ow = _msg->pose(i).orientation().w(); - auto ox = _msg->pose(i).orientation().x(); - auto oy = _msg->pose(i).orientation().y(); - auto oz = _msg->pose(i).orientation().z(); + for (int i = 0; i < msg->pose_size(); i++) { + auto x = msg->pose(i).position().x(); + auto y = msg->pose(i).position().y(); + auto z = msg->pose(i).position().z(); + auto ow = msg->pose(i).orientation().w(); + auto ox = msg->pose(i).orientation().x(); + auto oy = msg->pose(i).orientation().y(); + auto oz = msg->pose(i).orientation().z(); if (count % MESSAGE_THROTTLE == 0) { std::cout << "local (" << std::setw(2) << i << ") "; - std::cout << std::left << std::setw(32) << _msg->pose(i).name(); + std::cout << std::left << std::setw(32) << msg->pose(i).name(); std::cout << " x: " << std::right << std::setw(NWIDTH) << x; std::cout << " y: " << std::right << std::setw(NWIDTH) << y; std::cout << " z: " << std::right << std::setw(NWIDTH) << z; @@ -67,16 +67,10 @@ void cbLocalPose(ConstPosesStampedPtr& _msg) std::cout << " oz: " << std::right << std::setw(NWIDTH) << oz; std::cout << std::endl; } - if (i == _msg->pose_size() - 1) { - msr::airlib::Vector3r p; - msr::airlib::Quaternionr o; - p.x() = x; - p.y() = -y; - p.z() = -z; - o.w() = ow; - o.x() = ox; - o.y() = -oy; - o.z() = -oz; + if (i == msg->pose_size() - 1) { + msr::airlib::Vector3r p(x, -y, -z); + msr::airlib::Quaternionr o(ow, ox, -oy, -oz); + client.simSetVehiclePose(Pose(p, o), true); } } @@ -87,7 +81,7 @@ void cbLocalPose(ConstPosesStampedPtr& _msg) ++count; } -void cbGobalPose(ConstPosesStampedPtr& _msg) +void cbGobalPose(ConstPosesStampedPtr& msg) { std::cout << std::fixed; std::cout << std::setprecision(4); @@ -98,17 +92,17 @@ void cbGobalPose(ConstPosesStampedPtr& _msg) } ++count; - for (int i = 0; i < _msg->pose_size(); i++) { + for (int i = 0; i < msg->pose_size(); i++) { std::cout << "global (" << i << ") "; - std::cout << std::left << std::setw(32) << _msg->pose(i).name(); - std::cout << " x: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().x(); - std::cout << " y: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().y(); - std::cout << " z: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).position().z(); - - std::cout << " ow: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().w(); - std::cout << " ox: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().x(); - std::cout << " oy: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().y(); - std::cout << " oz: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << _msg->pose(i).orientation().z(); + std::cout << std::left << std::setw(32) << msg->pose(i).name(); + std::cout << " x: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << msg->pose(i).position().x(); + std::cout << " y: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << msg->pose(i).position().y(); + std::cout << " z: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << msg->pose(i).position().z(); + + std::cout << " ow: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << msg->pose(i).orientation().w(); + std::cout << " ox: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << msg->pose(i).orientation().x(); + std::cout << " oy: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << msg->pose(i).orientation().y(); + std::cout << " oz: " << std::right << std::setfill(' ') << std::setw(NWIDTH) << msg->pose(i).orientation().z(); std::cout << std::endl; } std::cout << std::endl; @@ -127,8 +121,8 @@ int main(int _argc, char** _argv) node->Init(); // Listen to Gazebo topics - gazebo::transport::SubscriberPtr subPose1 = node->Subscribe("~/pose/local/info", cbLocalPose); - gazebo::transport::SubscriberPtr subPose2 = node->Subscribe("~/pose/info", cbGobalPose); + gazebo::transport::SubscriberPtr sub_pose1 = node->Subscribe("~/pose/local/info", cbLocalPose); + gazebo::transport::SubscriberPtr sub_pose2 = node->Subscribe("~/pose/info", cbGobalPose); // Busy wait loop...replace with your own code as needed. while (true) From ad04f8fe6710b0629333aac124ea7ca13735405a Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 4 Jun 2021 16:38:26 -0300 Subject: [PATCH 5/5] undoing change in RpcLibAdaptorsBase constructors --- AirLib/include/api/RpcLibAdaptorsBase.hpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/AirLib/include/api/RpcLibAdaptorsBase.hpp b/AirLib/include/api/RpcLibAdaptorsBase.hpp index a49b005352..9cf5cd2ec4 100644 --- a/AirLib/include/api/RpcLibAdaptorsBase.hpp +++ b/AirLib/include/api/RpcLibAdaptorsBase.hpp @@ -49,13 +49,6 @@ namespace airlib_rpclib { } - Vector3r(x, y, z) - { - x_val = x; - y_val = y; - z_val = z; - } - Vector3r(const msr::airlib::Vector3r& s) { x_val = s.x(); @@ -112,14 +105,6 @@ namespace airlib_rpclib { } - Quaternionr(w, x, y, z) - { - w_val = w; - x_val = x; - y_val = y; - z_val = z; - } - Quaternionr(const msr::airlib::Quaternionr& s) { w_val = s.w();