Skip to content

Commit

Permalink
Revert "Merge pull request #21 from logivations/collision-monitor-add…
Browse files Browse the repository at this point in the history
…-frequency"

This reverts commit 4cf839b, reversing
changes made to 8996e15.
  • Loading branch information
Tony Najjar committed Jul 20, 2023
1 parent 0c9a5bf commit 3be8321
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,12 @@ class CollisionMonitor : public nav2_util::LifecycleNode
* @brief Supporting routine obtaining all ROS-parameters
* @param cmd_vel_in_topic Output name of cmd_vel_in topic
* @param cmd_vel_out_topic Output name of cmd_vel_out topic
* @param frequency Frequency of the loop running process_without_vel
* is required.
* @return True if all parameters were obtained or false in failure case
*/
bool getParameters(
std::string & cmd_vel_in_topic,
std::string & cmd_vel_out_topic,
double & frequency);
std::string & cmd_vel_out_topic);
/**
* @brief Supporting routine creating and configuring all polygons
* @param base_frame_id Robot base frame ID
Expand Down
10 changes: 2 additions & 8 deletions nav2_collision_monitor/src/collision_monitor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ CollisionMonitor::on_configure(const rclcpp_lifecycle::State & /*state*/)

std::string cmd_vel_in_topic;
std::string cmd_vel_out_topic;
double frequency;

// Obtaining ROS parameters
if (!getParameters(cmd_vel_in_topic, cmd_vel_out_topic, frequency)) {
if (!getParameters(cmd_vel_in_topic, cmd_vel_out_topic)) {
return nav2_util::CallbackReturn::FAILURE;
}

Expand Down Expand Up @@ -177,8 +176,7 @@ void CollisionMonitor::publishVelocity(const Action & robot_action)

bool CollisionMonitor::getParameters(
std::string & cmd_vel_in_topic,
std::string & cmd_vel_out_topic,
double & frequency)
std::string & cmd_vel_out_topic)
{
std::string base_frame_id, odom_frame_id;
tf2::Duration transform_tolerance;
Expand All @@ -193,10 +191,6 @@ bool CollisionMonitor::getParameters(
node, "cmd_vel_out_topic", rclcpp::ParameterValue("cmd_vel"));
cmd_vel_out_topic = get_parameter("cmd_vel_out_topic").as_string();

nav2_util::declare_parameter_if_not_declared(
node, "frequency", rclcpp::ParameterValue(10.0));
frequency = get_parameter("frequency").as_double();

nav2_util::declare_parameter_if_not_declared(
node, "base_frame_id", rclcpp::ParameterValue("base_footprint"));
base_frame_id = get_parameter("base_frame_id").as_string();
Expand Down

0 comments on commit 3be8321

Please sign in to comment.