diff --git a/CMakeLists.txt b/CMakeLists.txt index d6eece7..82716be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,10 @@ target_link_libraries(vrx_bridge_node vrx_bridge_component ) +install(DIRECTORY launch + DESTINATION share/${PROJECT_NAME} +) + if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() diff --git a/include/vrx_bridge/vrx_bridge_component.hpp b/include/vrx_bridge/vrx_bridge_component.hpp index c4573c7..5d1527e 100644 --- a/include/vrx_bridge/vrx_bridge_component.hpp +++ b/include/vrx_bridge/vrx_bridge_component.hpp @@ -23,35 +23,25 @@ extern "C" { // demos/composition/include/composition/visibility_control.h at https://github.com/ros2/demos #if defined _WIN32 || defined __CYGWIN__ #ifdef __GNUC__ -#define VRX_BRIDGE_COMPONENT_EXPORT \ - __attribute__((dllexport)) -#define VRX_BRIDGE_COMPONENT_IMPORT \ - __attribute__((dllimport)) +#define VRX_BRIDGE_COMPONENT_EXPORT __attribute__((dllexport)) +#define VRX_BRIDGE_COMPONENT_IMPORT __attribute__((dllimport)) #else -#define VRX_BRIDGE_COMPONENT_EXPORT \ - __declspec(dllexport) -#define VRX_BRIDGE_COMPONENT_IMPORT \ - __declspec(dllimport) +#define VRX_BRIDGE_COMPONENT_EXPORT __declspec(dllexport) +#define VRX_BRIDGE_COMPONENT_IMPORT __declspec(dllimport) #endif #ifdef VRX_BRIDGE_COMPONENT_BUILDING_DLL -#define VRX_BRIDGE_COMPONENT_PUBLIC \ - VRX_BRIDGE_COMPONENT_EXPORT +#define VRX_BRIDGE_COMPONENT_PUBLIC VRX_BRIDGE_COMPONENT_EXPORT #else -#define VRX_BRIDGE_COMPONENT_PUBLIC \ - VRX_BRIDGE_COMPONENT_IMPORT +#define VRX_BRIDGE_COMPONENT_PUBLIC VRX_BRIDGE_COMPONENT_IMPORT #endif -#define VRX_BRIDGE_COMPONENT_PUBLIC_TYPE \ - VRX_BRIDGE_COMPONENT_PUBLIC +#define VRX_BRIDGE_COMPONENT_PUBLIC_TYPE VRX_BRIDGE_COMPONENT_PUBLIC #define VRX_BRIDGE_COMPONENT_LOCAL #else -#define VRX_BRIDGE_COMPONENT_EXPORT \ - __attribute__((visibility("default"))) +#define VRX_BRIDGE_COMPONENT_EXPORT __attribute__((visibility("default"))) #define VRX_BRIDGE_COMPONENT_IMPORT #if __GNUC__ >= 4 -#define VRX_BRIDGE_COMPONENT_PUBLIC \ - __attribute__((visibility("default"))) -#define VRX_BRIDGE_COMPONENT_LOCAL \ - __attribute__((visibility("hidden"))) +#define VRX_BRIDGE_COMPONENT_PUBLIC __attribute__((visibility("default"))) +#define VRX_BRIDGE_COMPONENT_LOCAL __attribute__((visibility("hidden"))) #else #define VRX_BRIDGE_COMPONENT_PUBLIC #define VRX_BRIDGE_COMPONENT_LOCAL @@ -63,11 +53,10 @@ extern "C" { #endif #include -#include -#include #include #include - +#include +#include namespace vrx_bridge { diff --git a/launch/vrx_bringup.launch.xml b/launch/vrx_bringup.launch.xml new file mode 100644 index 0000000..b459793 --- /dev/null +++ b/launch/vrx_bringup.launch.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/package.xml b/package.xml index ab16c79..3641e48 100644 --- a/package.xml +++ b/package.xml @@ -14,8 +14,9 @@ geographic_msgs sensor_msgs geometry_msgs + launch - ament_lint_auto + ouxt_lint_auto ament_cmake diff --git a/src/vrx_bridge_component.cpp b/src/vrx_bridge_component.cpp index bbd162b..42dd6df 100644 --- a/src/vrx_bridge_component.cpp +++ b/src/vrx_bridge_component.cpp @@ -16,8 +16,7 @@ namespace vrx_bridge { -VRXBridgeComponent::VRXBridgeComponent( - const rclcpp::NodeOptions & options) +VRXBridgeComponent::VRXBridgeComponent(const rclcpp::NodeOptions & options) : Node("vrx_bridge", options) { gps_sub_ = this->create_subscription( @@ -37,8 +36,7 @@ VRXBridgeComponent::VRXBridgeComponent( goal_pub_ = this->create_publisher("/move_base_simple/goal", 1); } -void VRXBridgeComponent::GPStopic_callback( - const sensor_msgs::msg::NavSatFix::SharedPtr msg) +void VRXBridgeComponent::GPStopic_callback(const sensor_msgs::msg::NavSatFix::SharedPtr msg) { geographic_msgs::msg::GeoPoseStamped gps; gps.header = msg->header; @@ -49,8 +47,7 @@ void VRXBridgeComponent::GPStopic_callback( gps_pub_->publish(gps); } -void VRXBridgeComponent::Imutopic_callback( - const sensor_msgs::msg::Imu::SharedPtr msg) +void VRXBridgeComponent::Imutopic_callback(const sensor_msgs::msg::Imu::SharedPtr msg) { sensor_msgs::msg::Imu imu; imu.header = msg->header; @@ -59,8 +56,7 @@ void VRXBridgeComponent::Imutopic_callback( imu_pub_->publish(imu); } -void VRXBridgeComponent::Goaltopic_callback( - const geometry_msgs::msg::PoseStamped::SharedPtr msg) +void VRXBridgeComponent::Goaltopic_callback(const geometry_msgs::msg::PoseStamped::SharedPtr msg) { geometry_msgs::msg::PoseStamped goal; goal.header = msg->header; diff --git a/src/vrx_bridge_node.cpp b/src/vrx_bridge_node.cpp index b532ef0..299b420 100644 --- a/src/vrx_bridge_node.cpp +++ b/src/vrx_bridge_node.cpp @@ -20,8 +20,7 @@ int main(int argc, char * argv[]) { rclcpp::init(argc, argv); rclcpp::NodeOptions options; - auto component = - std::make_shared(options); + auto component = std::make_shared(options); rclcpp::spin(component); rclcpp::shutdown(); return 0;