diff --git a/urc_bringup/launch/bringup_simulation.launch.py b/urc_bringup/launch/bringup_simulation.launch.py index 4a07c7bb..8c392c28 100644 --- a/urc_bringup/launch/bringup_simulation.launch.py +++ b/urc_bringup/launch/bringup_simulation.launch.py @@ -129,12 +129,6 @@ def generate_launch_description(): remappings=[("/cmd_vel_out", "/rover_drivetrain_controller/cmd_vel")], ) - zero_cmd_vel_node = Node( - package="urc_platform", - executable="urc_platform_ZeroCmdVelNode", - output="screen", - ) - # ekf_launch = IncludeLaunchDescription( # PythonLaunchDescriptionSource( # [FindPackageShare("urc_localization"), @@ -224,7 +218,6 @@ def generate_launch_description(): ], ) ), - zero_cmd_vel_node, enable_color, gazebo, load_robot_state_publisher, diff --git a/urc_platform/CMakeLists.txt b/urc_platform/CMakeLists.txt index 5bcc50b3..1d497ddd 100644 --- a/urc_platform/CMakeLists.txt +++ b/urc_platform/CMakeLists.txt @@ -19,7 +19,6 @@ include_directories( # Library creation add_library(${PROJECT_NAME} SHARED src/joystick_driver.cpp - src/zero_cmd_vel_node.cpp ) set(dependencies @@ -42,12 +41,6 @@ rclcpp_components_register_node( EXECUTABLE ${PROJECT_NAME}_JoystickDriver ) -rclcpp_components_register_node( - ${PROJECT_NAME} - PLUGIN "zero_cmd_vel_node::ZeroCmdVelNode" - EXECUTABLE ${PROJECT_NAME}_ZeroCmdVelNode -) - # Install launch files. install( DIRECTORY diff --git a/urc_platform/include/zero_cmd_vel_node.hpp b/urc_platform/include/zero_cmd_vel_node.hpp deleted file mode 100644 index 723b8239..00000000 --- a/urc_platform/include/zero_cmd_vel_node.hpp +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef JOYSTICK_DRIVER_H -#define JOYSTICK_DRIVER_H - -#include -#include -#include -#include - -namespace zero_cmd_vel_node { -class ZeroCmdVelNode : public rclcpp::Node { -public: - explicit ZeroCmdVelNode(const rclcpp::NodeOptions &options); - -private: - void publish_zero_cmd_vel(); - std::shared_ptr> - drivetrain_cmd_publisher; - rclcpp::TimerBase::SharedPtr timer_; -}; -} // namespace zero_cmd_vel_node - -#endif diff --git a/urc_platform/src/zero_cmd_vel_node.cpp b/urc_platform/src/zero_cmd_vel_node.cpp deleted file mode 100644 index 2cb24ca9..00000000 --- a/urc_platform/src/zero_cmd_vel_node.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "zero_cmd_vel_node.hpp" - -namespace zero_cmd_vel_node { - -ZeroCmdVelNode::ZeroCmdVelNode(const rclcpp::NodeOptions &options) - : rclcpp::Node("zero_cmd_vel_node", options) { - declare_parameter("zero_cmd_vel_topic", "/cmd_vel_zero"); - drivetrain_cmd_publisher = create_publisher( - get_parameter("zero_cmd_vel_topic").as_string(), - rclcpp::SystemDefaultsQoS()); - - timer_ = this->create_wall_timer( - std::chrono::milliseconds(100), - std::bind(&ZeroCmdVelNode::publish_zero_cmd_vel, this)); -} - -void ZeroCmdVelNode::publish_zero_cmd_vel() { - geometry_msgs::msg::TwistStamped zero_cmd_vel; - zero_cmd_vel.twist.linear.x = 0.0; - zero_cmd_vel.twist.angular.z = 0.0; - drivetrain_cmd_publisher->publish(zero_cmd_vel); - -} // namespace zero_cmd_vel_node -} // namespace zero_cmd_vel_node - -RCLCPP_COMPONENTS_REGISTER_NODE(zero_cmd_vel_node::ZeroCmdVelNode);