This commit is contained in:
Hyungyu Kim 2025-02-17 16:26:47 +09:00
parent bd210f20ae
commit 68c9a41a76
No known key found for this signature in database
GPG Key ID: E1730AE24BD6C2B7
4 changed files with 3 additions and 4 deletions

View File

@ -23,7 +23,7 @@ void Obstacle1::Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/)
this->model = _parent;
gazebo::common::PoseAnimationPtr anim(
new gazebo::common::PoseAnimation("move1", 160.0, true));
new gazebo::common::PoseAnimation("move1", 160.0, true));
gazebo::common::PoseKeyFrame * key;

View File

@ -25,7 +25,7 @@ void Obstacles::Load(physics::ModelPtr _parent, sdf::ElementPtr /*_sdf*/)
gazebo::common::PoseAnimationPtr anim(
new gazebo::common::PoseAnimation("move", 40.0, true));
gazebo::common::PoseKeyFrame *key;
gazebo::common::PoseKeyFrame * key;
key = anim->CreateKeyFrame(0);
key->Translation(ignition::math::Vector3d(0.0, 0.0, 0.0));

View File

@ -60,4 +60,3 @@ void TrafficBar::OnUpdate()
}
}
} // namespace gazebo

View File

@ -38,7 +38,7 @@ void TrafficLight::Load(physics::ModelPtr _model, sdf::ElementPtr _sdf)
this->msg.set_parent_name(this->model->GetName());
std::cout << this->model->GetName() << " plugin load success!" << std::endl;
this->update_connection = event::Events::ConnectWorldUpdateBegin(
std::bind(&TrafficLight::OnUpdate, this));
std::bind(&TrafficLight::OnUpdate, this));
this->last_time = this->world->SimTime();
}
void TrafficLight::OnUpdate()