Skip to content

Commit

Permalink
joint_state_broadcaster if no local topic us "/" as prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
mamueluth committed May 17, 2023
1 parent 260bf33 commit 6545cea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion joint_state_broadcaster/src/joint_state_broadcaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ controller_interface::CallbackReturn JointStateBroadcaster::on_configure(

try
{
const std::string topic_name_prefix = params_.use_local_topics ? "~/" : "";
const std::string topic_name_prefix = params_.use_local_topics ? "~/" : "/";

joint_state_publisher_ = get_node()->create_publisher<sensor_msgs::msg::JointState>(
topic_name_prefix + "joint_states", rclcpp::SystemDefaultsQoS());
Expand Down

0 comments on commit 6545cea

Please sign in to comment.