fixed issue in simNotifyRender

This commit is contained in:
Shital Shah 2017-07-10 20:14:04 -07:00
Родитель dd5bb2b5b2
Коммит 9d504b8ee4
2 изменённых файлов: 12 добавлений и 11 удалений

Просмотреть файл

@ -254,17 +254,18 @@ protected:
void simNotifyRender() override
{
std::unique_lock<std::mutex> render_wait_lock(render_mutex_);
if (!is_pose_update_done_) {
auto kinematics = physics_body_->getKinematics();
if (! VectorMath::hasNan(pending_pose_.position))
kinematics.pose.position = pending_pose_.position;
if (! VectorMath::hasNan(pending_pose_.orientation))
kinematics.pose.orientation = pending_pose_.orientation;
physics_body_->setKinematics(kinematics);
auto kinematics = physics_body_->getKinematics();
if (! VectorMath::hasNan(pending_pose_.position))
kinematics.pose.position = pending_pose_.position;
if (! VectorMath::hasNan(pending_pose_.orientation))
kinematics.pose.orientation = pending_pose_.orientation;
physics_body_->setKinematics(kinematics);
is_pose_update_done_ = true;
render_wait_lock.unlock();
render_cond_.notify_all();
is_pose_update_done_ = true;
render_wait_lock.unlock();
render_cond_.notify_all();
}
}
//*** End: DroneControllerBase implementation ***//

Просмотреть файл

@ -61,6 +61,6 @@ void runSteroImageGenerator(int num_samples, std::string storage_path)
int main(int argc, const char *argv[])
{
runSteroImageGenerator(argc < 2 ? 20000 : std::stoi(argv[1]), argc < 3 ? "c:\\temp\\stg_blocks" : std::string(argv[2]));
runSteroImageGenerator(argc < 2 ? 20000 : std::stoi(argv[1]), argc < 3 ? "c:\\temp\\stig2" : std::string(argv[2]));
}