Closed enco77 closed 2 years ago
@enco77 The problem with this rostopic pub /roboteq/emergency_stop std_msgs/Bool "data: false" -r 10
. Because when you release the command in the terminal you only send the same flag, you need to send the command to continue controlling the motors.
@enco77 The problem with this
rostopic pub /roboteq/emergency_stop std_msgs/Bool "data: false" -r 10
. Because when you release the command in the terminal you only send the same flag, you need to send the command to continue controlling the motors.
I don't clearly understand you. Did you mean velocity commands? I control motors usingrosrun teleop_twist_keyboard teleop_twist_keyboard.py
maybe it's a bug
void Roboteq::stop_Callback(const std_msgs::Bool::ConstPtr& msg)
{
// Wait end motor loop
//while(motor_loop_);
// Read status message
bool status = (bool)msg.get()->data;
if(status)
{
// Send emergency stop
mSerial->command("EX");
ROS_WARN_STREAM("Emergency stop");
} else
{
// Safety release
mSerial->command("MG");
ROS_WARN_STREAM("Safety release");
}
}`
after commenting while(motor_loop_); it's work
whenever publishing false or true to '/roboteq/emergency stop' topic emergency stop turns on rostopic pub /roboteq/emergency_stop std_msgs/Bool "data: false" -r 10 Publishing like @thingsjimenez said code:
emergency stop don't release