From 49734fd5fd6ceddaedb072e8f7822de64e3f751f Mon Sep 17 00:00:00 2001 From: Yannic Bachmann Date: Wed, 12 Jun 2024 11:30:30 +0200 Subject: [PATCH] resolved merge conflicts --- README.md | 5 ----- src/teleop_twist_joy.cpp | 18 +----------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/README.md b/README.md index da9afa6..f846675 100644 --- a/README.md +++ b/README.md @@ -64,11 +64,7 @@ The message type can be changed to `geometry_msgs/msg/TwistStamped` by the `publ - `scale_angular_turbo.yaw (double, default: 1.0)` - `scale_angular_turbo.pitch (double, default: 0.0)` - `scale_angular_turbo.roll (double, default: 0.0)` - -<<<<<<< HEAD - -======= - `inverted_reverse (bool, default: false)` - Whether to invert turning left-right while reversing (useful for differential wheeled robots). @@ -77,7 +73,6 @@ The message type can be changed to `geometry_msgs/msg/TwistStamped` by the `publ - `frame (string, default: 'teleop_twist_joy')` - Frame name used for the header of TwistStamped messages. ->>>>>>> 76cd650 (Add an option to publish TwistStamped (#42)) # Usage diff --git a/src/teleop_twist_joy.cpp b/src/teleop_twist_joy.cpp index f72989b..6455b5d 100644 --- a/src/teleop_twist_joy.cpp +++ b/src/teleop_twist_joy.cpp @@ -52,14 +52,10 @@ namespace teleop_twist_joy struct TeleopTwistJoy::Impl { void joyCallback(const sensor_msgs::msg::Joy::SharedPtr joy); -<<<<<<< HEAD - void sendCmdVelMsg(const sensor_msgs::msg::Joy::SharedPtr, const std::string& which_map); -======= void sendCmdVelMsg(const sensor_msgs::msg::Joy::SharedPtr, const std::string & which_map); void fillCmdVelMsg( const sensor_msgs::msg::Joy::SharedPtr, const std::string & which_map, geometry_msgs::msg::Twist * cmd_vel_msg); ->>>>>>> 76cd650 (Add an option to publish TwistStamped (#42)) rclcpp::Subscription::SharedPtr joy_sub; rclcpp::Publisher::SharedPtr cmd_vel_pub; @@ -88,10 +84,6 @@ TeleopTwistJoy::TeleopTwistJoy(const rclcpp::NodeOptions& options) : Node("teleo { pimpl_ = new Impl; -<<<<<<< HEAD - pimpl_->cmd_vel_pub = this->create_publisher("cmd_vel", 10); - pimpl_->joy_sub = this->create_subscription("joy", rclcpp::QoS(10), -======= pimpl_->clock = this->get_clock(); pimpl_->publish_stamped_twist = this->declare_parameter("publish_stamped_twist", false); @@ -105,7 +97,6 @@ TeleopTwistJoy::TeleopTwistJoy(const rclcpp::NodeOptions& options) : Node("teleo } pimpl_->joy_sub = this->create_subscription( "joy", rclcpp::QoS(10), ->>>>>>> 76cd650 (Add an option to publish TwistStamped (#42)) std::bind(&TeleopTwistJoy::Impl::joyCallback, this->pimpl_, std::placeholders::_1)); pimpl_->require_enable_button = this->declare_parameter("require_enable_button", true); @@ -366,19 +357,12 @@ void TeleopTwistJoy::Impl::sendCmdVelMsg(const sensor_msgs::msg::Joy::SharedPtr sent_disable_msg = false; } -<<<<<<< HEAD - cmd_vel_msg->linear.x = getVal(joy_msg, axis_linear_map, scale_linear_map[which_map], "x"); -======= void TeleopTwistJoy::Impl::fillCmdVelMsg( const sensor_msgs::msg::Joy::SharedPtr joy_msg, const std::string & which_map, geometry_msgs::msg::Twist * cmd_vel_msg) { - double lin_x = getVal(joy_msg, axis_linear_map, scale_linear_map[which_map], "x"); - double ang_z = getVal(joy_msg, axis_angular_map, scale_angular_map[which_map], "yaw"); - - cmd_vel_msg->linear.x = lin_x; ->>>>>>> 76cd650 (Add an option to publish TwistStamped (#42)) + cmd_vel_msg->linear.x = getVal(joy_msg, axis_linear_map, scale_linear_map[which_map], "x"); cmd_vel_msg->linear.y = getVal(joy_msg, axis_linear_map, scale_linear_map[which_map], "y"); cmd_vel_msg->linear.z = getVal(joy_msg, axis_linear_map, scale_linear_map[which_map], "z"); cmd_vel_msg->angular.z = getVal(joy_msg, axis_angular_map, scale_angular_map[which_map], "yaw");