@@ -41,6 +41,8 @@ void OperationModeManager::setup_publishers() {
4141 this ->get_parameter (" topics.killswitch" ).as_string ();
4242 const auto operation_mode_topic =
4343 this ->get_parameter (" topics.operation_mode" ).as_string ();
44+ const auto killswitch_string_topic = killswitch_topic + " _string" ;
45+ const auto operation_mode_string_topic = operation_mode_topic + " _string" ;
4446
4547 wrench_pub_ = this ->create_publisher <geometry_msgs::msg::WrenchStamped>(
4648 wrench_input_topic,
@@ -51,6 +53,14 @@ void OperationModeManager::setup_publishers() {
5153
5254 mode_pub_ = this ->create_publisher <vortex_msgs::msg::OperationMode>(
5355 operation_mode_topic, vortex::utils::qos_profiles::reliable_profile (1 ));
56+
57+ killswitch_string_pub_ = this ->create_publisher <std_msgs::msg::String>(
58+ killswitch_string_topic,
59+ vortex::utils::qos_profiles::reliable_profile (1 ));
60+
61+ mode_string_pub_ = this ->create_publisher <std_msgs::msg::String>(
62+ operation_mode_string_topic,
63+ vortex::utils::qos_profiles::reliable_profile (1 ));
5464}
5565
5666void OperationModeManager::setup_services () {
@@ -152,6 +162,14 @@ void OperationModeManager::publish_mode() {
152162 std_msgs::msg::Bool killswitch_msg;
153163 killswitch_msg.data = killswitch_;
154164 killswitch_pub_->publish (killswitch_msg);
165+
166+ std_msgs::msg::String killswitch_string_msg;
167+ killswitch_string_msg.data = " killswitch: " + std::string (killswitch_ ? " true" : " false" );
168+ killswitch_string_pub_->publish (killswitch_string_msg);
169+
170+ std_msgs::msg::String mode_string_msg;
171+ mode_string_msg.data = " mode: " + vortex::utils::types::mode_to_string (mode_);
172+ mode_string_pub_->publish (mode_string_msg);
155173}
156174
157175void OperationModeManager::publish_empty_wrench () {
0 commit comments