Skip to content

Commit

Permalink
Move sensor_gps topic name to header
Browse files Browse the repository at this point in the history
  • Loading branch information
Jari Nippula committed Sep 26, 2022
1 parent 5f192e0 commit 48334d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/mocap_pose/mocap_pose.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <rclcpp/rclcpp.hpp>
//#include <std_msgs/msg/string.hpp>

const std::string kGpsSensorTopic = "/fmu/in/SensorGps";

/// ROS2 Driver for Qualisys Motion Capture (Mocap) system
/// Provides "fake GPS" messages for selected Mocap object (set up with ROS2 parameters)
class MocapPose : public rclcpp::Node
Expand Down
2 changes: 1 addition & 1 deletion src/mocap_pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ MocapPose::MocapPose() : Node("MocapPose"), impl_(new MocapPose::Impl()), minTim
impl_->cb_handle_lon = impl_->param_subscriber->add_parameter_callback("home_lon", callback);
impl_->cb_handle_alt = impl_->param_subscriber->add_parameter_callback("home_alt", callback);

impl_->publisher = create_publisher<px4_msgs::msg::SensorGps>("/fmu/in/SensorGps", 10);
impl_->publisher = create_publisher<px4_msgs::msg::SensorGps>(kGpsSensorTopic, 10);
impl_->worker_thread_running = true;
impl_->worker_thread = std::thread(&MocapPose::WorkerThread, this);
}
Expand Down

0 comments on commit 48334d4

Please sign in to comment.