24 #include <MemoryX/gui-plugins/PriorMemoryEditor/ui_MotionAttributesEditTab.h>
40 connect(ui->comboBoxMotionModel, SIGNAL(currentIndexChanged(
const QString&)),
this, SLOT(
motionModelChanged(
const QString&)));
41 connect(ui->comboBoxSimulationType, SIGNAL(currentIndexChanged(
const QString&)),
this, SLOT(
simulationTypeChanged(
const QString&)));
57 int index = ui->comboBoxMotionModel->findText(QString(objectRecognitionWrapper->getDefaultMotionModel().c_str()));
60 ui->comboBoxMotionModel->setCurrentIndex(
index);
64 VirtualRobot::SceneObject::Physics::SimulationType simType = simoxWrapper->getManipulationObject()->getSimulationType();
65 index = ui->comboBoxSimulationType->findText(simTypeToString(simType));
68 ui->comboBoxSimulationType->setCurrentIndex(
index);
78 std::string motionModelName = ui->comboBoxMotionModel->currentText().toStdString();
79 ARMARX_INFO <<
"Setting motion model: " << motionModelName;
80 objectRecognitionWrapper->setDefaultMotionModel(motionModelName);
83 VirtualRobot::ManipulationObjectPtr mo = simoxWrapper->getManipulationObject();
84 QString simulationTypeName = ui->comboBoxSimulationType->currentText();
86 ARMARX_INFO << simoxWrapper->getManipulationObjectFileName();
87 ARMARX_INFO <<
"Setting simulation type: " << simulationTypeName.toStdString();
88 mo->setSimulationType(stringToSimType(simulationTypeName));
89 simoxWrapper->setAndStoreManipulationObject(mo, filesDBName);
100 QString MotionAttributesEditTab::simTypeToString(VirtualRobot::SceneObject::Physics::SimulationType simType)
104 case VirtualRobot::SceneObject::Physics::eStatic:
106 case VirtualRobot::SceneObject::Physics::eKinematic:
108 case VirtualRobot::SceneObject::Physics::eDynamic:
115 VirtualRobot::SceneObject::Physics::SimulationType MotionAttributesEditTab::stringToSimType(
const QString&
string)
117 if (
string ==
"Static")
119 return VirtualRobot::SceneObject::Physics::eStatic;
121 else if (
string ==
"Kinematic")
123 return VirtualRobot::SceneObject::Physics::eKinematic;
125 else if (
string ==
"Dynamic")
127 return VirtualRobot::SceneObject::Physics::eDynamic;
131 return VirtualRobot::SceneObject::Physics::eUnknown;