Skip to content

Commit 9e89d6b

Browse files
committed
Fix E-Stop Topic
1 parent 6237147 commit 9e89d6b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dynamixel_ros_control/src/dynamixel_hardware_interface.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ DynamixelHardwareInterface::on_init(const hardware_interface::HardwareInfo& hard
165165
controller_orchestrator_ = std::make_shared<controller_orchestrator::ControllerOrchestrator>(node_);
166166

167167
// set up e-stop subscription
168+
std::string topic = ns != "/" ? ns + "/soft_e_stop" : "/soft_e_stop";
168169
soft_e_stop_subscription_ = node_->create_subscription<std_msgs::msg::Bool>(
169-
"~/soft_e_stop", rclcpp::SystemDefaultsQoS(), [this](const std_msgs::msg::Bool::SharedPtr msg) {
170+
topic, rclcpp::SystemDefaultsQoS(), [this](const std_msgs::msg::Bool::SharedPtr msg) {
170171
if (lifecycle_state_.label() != hardware_interface::lifecycle_state_names::ACTIVE) {
171172
DXL_LOG_WARN("E-Stop message received but hardware interface is not in 'active' state.");
172173
return;

0 commit comments

Comments
 (0)