Commit 97a26221 authored by Joseph Mirabel's avatar Joseph Mirabel

Handle HPP errors in path player.

parent 840868fc
...@@ -267,15 +267,22 @@ namespace hpp { ...@@ -267,15 +267,22 @@ namespace hpp {
void PathPlayer::updateConfiguration () void PathPlayer::updateConfiguration ()
{ {
hpp::floatSeq_var config = gepetto::gui::MainWindow* main = gepetto::gui::MainWindow::instance();
plugin_->client()->problem()->configAtParam ((CORBA::ULong)pathIndex()->value(),currentParam_); hpp::floatSeq_var config, velocity;
plugin_->currentConfig() = config.in(); try {
if (velocity_) { config = plugin_->client()->problem()->configAtParam
config = ((CORBA::ULong)pathIndex()->value(),currentParam_);
plugin_->client()->problem()->derivativeAtParam ((CORBA::ULong)pathIndex()->value(),1,currentParam_); if (velocity_)
plugin_->currentVelocity() = config.in(); velocity = plugin_->client()->problem()->derivativeAtParam
((CORBA::ULong)pathIndex()->value(),1,currentParam_);
} catch (const hpp::Error& e) {
main->logError(e.msg.in());
return;
} }
gepetto::gui::MainWindow::instance()->requestApplyCurrentConfiguration(); plugin_->currentConfig() = config.in();
if (velocity_)
plugin_->currentVelocity() = velocity.in();
main->requestApplyCurrentConfiguration();
emit appliedConfigAtParam (getCurrentPath(), currentParam_); emit appliedConfigAtParam (getCurrentPath(), currentParam_);
} }
......
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