Update deprecated syntax to be compatible with ROS melodic and Gazebo9.

parent 85dc009c
......@@ -61,7 +61,7 @@ namespace gazebo
{
static int seq=0;
this->sensor_update_time_ = this->parentSensor_->GetLastUpdateTime();
this->sensor_update_time_ = this->parentSensor_->LastUpdateTime();
if (!this->parentSensor->IsActive())
{
......@@ -73,7 +73,11 @@ namespace gazebo
{
if ((*this->image_connect_count_) > 0)
{
common::Time cur_time = this->world_->GetSimTime();
#if ROS_VERSION_MINIMUM(1, 14, 6)
common::Time cur_time = this->world_->SimTime();
# else
common::Time cur_time = this->world_->GetSimTime();
#endif
if (cur_time - this->last_update_time_ >= this->update_period_)
{
this->PutCameraData(_image);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment