Skip to content

Commit

Permalink
Fix: redundant launch argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Jan 12, 2024
1 parent c8e32b3 commit 9e81211
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ class ReactiveNav2DNode : public rclcpp::Node
std::string m_sub_topic_wp_seq = "reactive_nav_waypoints";
std::string m_sub_topic_odometry = "/odom";

// It's remapped as needed from the launch.py
const std::string m_pub_topic_cmd_vel = "/cmd_vel";
std::string m_pub_topic_cmd_vel = "/cmd_vel";

std::string m_frameid_reference = "map";
std::string m_frameid_robot = "base_link";
Expand Down
10 changes: 6 additions & 4 deletions mrpt_reactivenav2d/launch/rnav.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def generate_launch_description():
'save_nav_log',
default_value='False'
)
cmd_vel_out_arg = DeclareLaunchArgument(
'cmd_vel_out',
topic_cmd_vel_arg = DeclareLaunchArgument(
'topic_cmd_vel',
default_value='/cmd_vel'
)

Expand All @@ -69,12 +69,13 @@ def generate_launch_description():

emit_shutdown_action = Shutdown(reason='launch is shutting down')

# remappings={('/cmd_vel', LaunchConfiguration('cmd_vel_out'))},

node_rnav2d_launch = Node(
package='mrpt_reactivenav2d',
executable='mrpt_reactivenav2d_node',
name='mrpt_reactivenav2d_node',
output='screen',
remappings={('/cmd_vel', LaunchConfiguration('cmd_vel_out'))},
parameters=[
{
'cfg_file_reactive': LaunchConfiguration('rnav_cfg_file'),
Expand All @@ -85,6 +86,7 @@ def generate_launch_description():
'frameid_reference': LaunchConfiguration('frameid_reference'),
'frameid_robot': LaunchConfiguration('frameid_robot'),
'save_nav_log': LaunchConfiguration('save_nav_log'),
'topic_cmd_vel': LaunchConfiguration('topic_cmd_vel'),
}
],
arguments=['--ros-args', '--log-level',
Expand All @@ -102,6 +104,6 @@ def generate_launch_description():
frameid_reference_arg,
frameid_robot_arg,
save_nav_log_arg,
cmd_vel_out_arg,
topic_cmd_vel_arg,
node_rnav2d_launch,
])

0 comments on commit 9e81211

Please sign in to comment.