Skip to content

Commit

Permalink
apply reformat
Browse files Browse the repository at this point in the history
Signed-off-by: Masaya Kataoka <[email protected]>
  • Loading branch information
hakuturu583 committed Jan 24, 2024
1 parent e435c22 commit adcc4ea
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 33 deletions.
35 changes: 12 additions & 23 deletions include/vrx_bridge/vrx_bridge_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -63,11 +53,10 @@ extern "C" {
#endif

#include <geographic_msgs/msg/geo_pose_stamped.hpp>
#include <sensor_msgs/msg/imu.hpp>
#include <sensor_msgs/msg/nav_sat_fix.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <rclcpp/rclcpp.hpp>

#include <sensor_msgs/msg/imu.hpp>
#include <sensor_msgs/msg/nav_sat_fix.hpp>

namespace vrx_bridge
{
Expand Down
12 changes: 4 additions & 8 deletions src/vrx_bridge_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<sensor_msgs::msg::NavSatFix>(
Expand All @@ -37,8 +36,7 @@ VRXBridgeComponent::VRXBridgeComponent(
goal_pub_ = this->create_publisher<geometry_msgs::msg::PoseStamped>("/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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/vrx_bridge_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ int main(int argc, char * argv[])
{
rclcpp::init(argc, argv);
rclcpp::NodeOptions options;
auto component =
std::make_shared<vrx_bridge::VRXBridgeComponent>(options);
auto component = std::make_shared<vrx_bridge::VRXBridgeComponent>(options);
rclcpp::spin(component);
rclcpp::shutdown();
return 0;
Expand Down

0 comments on commit adcc4ea

Please sign in to comment.