Skip to content

Commit

Permalink
uncommented motor speed publishing, increased queue size
Browse files Browse the repository at this point in the history
  • Loading branch information
petrlmat committed Feb 6, 2024
1 parent e470dec commit 40a30ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/gazebo_motor_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ void GazeboMotorModel::InitializeParams() {}

void GazeboMotorModel::Publish() {
turning_velocity_msg_.set_data(joint_->GetVelocity(0));
// FIXME: Commented out to prevent warnings about queue limit reached.
// motor_velocity_pub_->Publish(turning_velocity_msg_);
motor_velocity_pub_->Publish(turning_velocity_msg_);
}

void GazeboMotorModel::Load(physics::ModelPtr _model, sdf::ElementPtr _sdf) {
Expand Down Expand Up @@ -154,8 +153,7 @@ void GazeboMotorModel::Load(physics::ModelPtr _model, sdf::ElementPtr _sdf) {
command_sub_ = node_handle_->Subscribe<mav_msgs::msgs::CommandMotorSpeed>("~/" + model_->GetName() + command_sub_topic_, &GazeboMotorModel::VelocityCallback, this);
//std::cout << "[gazebo_motor_model]: Subscribe to gz topic: "<< motor_failure_sub_topic_ << std::endl;
motor_failure_sub_ = node_handle_->Subscribe<msgs::Int>(motor_failure_sub_topic_, &GazeboMotorModel::MotorFailureCallback, this);
// FIXME: Commented out to prevent warnings about queue limit reached.
//motor_velocity_pub_ = node_handle_->Advertise<std_msgs::msgs::Float>("~/" + model_->GetName() + motor_speed_pub_topic_, 1);
motor_velocity_pub_ = node_handle_->Advertise<std_msgs::msgs::Float>("~/" + model_->GetName() + motor_speed_pub_topic_, 10);
wind_sub_ = node_handle_->Subscribe("~/" + wind_sub_topic_, &GazeboMotorModel::WindVelocityCallback, this);

// Create the first order filter.
Expand Down

0 comments on commit 40a30ca

Please sign in to comment.