diff --git a/diff_drive_controller/src/diff_drive_controller.cpp b/diff_drive_controller/src/diff_drive_controller.cpp index 42b6cda8e1..296e00ff0a 100644 --- a/diff_drive_controller/src/diff_drive_controller.cpp +++ b/diff_drive_controller/src/diff_drive_controller.cpp @@ -385,6 +385,15 @@ controller_interface::CallbackReturn DiffDriveController::on_configure( const auto odom_frame_id = tf_prefix + params_.odom_frame_id; const auto base_frame_id = tf_prefix + params_.base_frame_id; + for (auto & joint_name : params_.left_wheel_names) + { + joint_name = tf_prefix + joint_name; + } + for (auto & joint_name : params_.right_wheel_names) + { + joint_name = tf_prefix + joint_name; + } + auto & odometry_message = realtime_odometry_publisher_->msg_; odometry_message.header.frame_id = odom_frame_id; odometry_message.child_frame_id = base_frame_id;