diff --git a/gazebo_msgs/srv/GetEntityState.srv b/gazebo_msgs/srv/GetEntityState.srv index f62f1171b..642721782 100644 --- a/gazebo_msgs/srv/GetEntityState.srv +++ b/gazebo_msgs/srv/GetEntityState.srv @@ -9,4 +9,3 @@ std_msgs/Header header # Standard metadata for higher-level stampe # * header.frame_id Filled with the relative_frame. gazebo_msgs/EntityState state # Contains pose and twist. bool success # Return true if get was successful. If false, the state contains garbage. -string status_message # Comments if available. diff --git a/gazebo_msgs/srv/SetEntityState.srv b/gazebo_msgs/srv/SetEntityState.srv index 0cc226f4a..457f7e525 100644 --- a/gazebo_msgs/srv/SetEntityState.srv +++ b/gazebo_msgs/srv/SetEntityState.srv @@ -2,4 +2,3 @@ gazebo_msgs/EntityState state # Entity state to set to. # Be sure to fill all fields, values of zero have meaning. --- bool success # Return true if setting state was successful. -string status_message # Comments if available. diff --git a/gazebo_plugins/worlds/gazebo_ros_diff_drive_demo.world b/gazebo_plugins/worlds/gazebo_ros_diff_drive_demo.world index a2806b5f6..386f95635 100644 --- a/gazebo_plugins/worlds/gazebo_ros_diff_drive_demo.world +++ b/gazebo_plugins/worlds/gazebo_ros_diff_drive_demo.world @@ -14,7 +14,7 @@ Try listening to TF: - ros2 run tf2_ros tf2_echo odom chassis + ros2 run tf2_ros tf2_echo odom_demo chassis ros2 run tf2_ros tf2_echo chassis right_wheel diff --git a/gazebo_ros/src/gazebo_ros_state.cpp b/gazebo_ros/src/gazebo_ros_state.cpp index 32dd0397c..8cb08680f 100644 --- a/gazebo_ros/src/gazebo_ros_state.cpp +++ b/gazebo_ros/src/gazebo_ros_state.cpp @@ -95,9 +95,9 @@ void GazeboRosStatePrivate::GetEntityState( auto entity = world_->EntityByName(_req->name); if (!entity) { _res->success = false; - _res->status_message = "GetEntityState: entity [" + _req->name + "] does not exist"; - RCLCPP_ERROR(ros_node_->get_logger(), _res->status_message.c_str()); + RCLCPP_ERROR(ros_node_->get_logger(), + "GetEntityState: entity [%s] does not exist", _req->name); return; } @@ -122,10 +122,10 @@ void GazeboRosStatePrivate::GetEntityState( "GetEntityState: reference_frame is empty/world, using inertial frame"); } else { _res->success = false; - _res->status_message = "GetEntityState: reference entity [" + _req->name + - "] not found, did you forget to scope the entity's name?"; - RCLCPP_ERROR(ros_node_->get_logger(), _res->status_message.c_str()); + RCLCPP_ERROR(ros_node_->get_logger(), + "GetEntityState: reference entity [%s] not found, did you forget to scope the entity name?", + _req->name); return; } @@ -140,7 +140,6 @@ void GazeboRosStatePrivate::GetEntityState( _res->state.twist.angular = Convert(entity_ang_vel); _res->success = true; - _res->status_message = "GetEntityState: got entity state"; } void GazeboRosStatePrivate::SetEntityState( @@ -161,9 +160,9 @@ void GazeboRosStatePrivate::SetEntityState( auto entity = world_->EntityByName(_req->state.name); if (!entity) { _res->success = false; - _res->status_message = "SetEntityState: entity [" + _req->state.name + "] does not exist"; - RCLCPP_ERROR(ros_node_->get_logger(), _res->status_message.c_str()); + RCLCPP_ERROR(ros_node_->get_logger(), + "SetEntityState: entity [%s] does not exist", _req->state.name); return; } @@ -182,10 +181,10 @@ void GazeboRosStatePrivate::SetEntityState( "SetEntityState: reference_frame is empty/world, using inertial frame"); } else { _res->success = false; - _res->status_message = "GetEntityState: reference entity [" + _req->state.name + - "] not found, did you forget to scope the entity's name?"; - RCLCPP_ERROR(ros_node_->get_logger(), _res->status_message.c_str()); + RCLCPP_ERROR(ros_node_->get_logger(), + "GetEntityState: reference entity [%s] not found, did you forget to scope the entity name?", + _req->state.name); return; } @@ -210,7 +209,6 @@ void GazeboRosStatePrivate::SetEntityState( // Fill response _res->success = true; - _res->status_message = "SetEntityState: set entity state done"; } GZ_REGISTER_WORLD_PLUGIN(GazeboRosState)