Skip to content
Snippets Groups Projects
Commit d09ec92e authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Merge branch 'master' into armem/dev

parents 7dd1cd3b 10a5633f
No related branches found
No related tags found
1 merge request!137Armem/dev
......@@ -137,7 +137,7 @@ namespace armarx
};
// params
static const int ROBOT_UNIT_MAXIMUM_FREQUENCY = 100;
static constexpr int ROBOT_UNIT_MAXIMUM_FREQUENCY = 100;
int robotUnitPollFrequency = 50;
std::string robotUnitSensorPrefix = "sens.*";
unsigned int robotUnitMemoryBatchSize = 50;
......@@ -158,7 +158,7 @@ namespace armarx
};
// params
static const int ROBOT_STATE_COMPONENT_MAXIMUM_FREQUENCY = 100;
static constexpr int ROBOT_STATE_COMPONENT_MAXIMUM_FREQUENCY = 100;
int robotStateComponentPollFrequency = 50;
unsigned int robotStateComponentMemoryBatchSize = 50;
......
......@@ -11,6 +11,7 @@ namespace armarx
_ui.doubleSpinBoxTZ->value())
.orientation(_ui.doubleSpinBoxRX->value(),
_ui.doubleSpinBoxRY->value(),
_ui.doubleSpinBoxRZ->value()));
_ui.doubleSpinBoxRZ->value())
.scale(_ui.doubleSpinBoxScale->value()));
}
}
......@@ -26,6 +26,22 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="3" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxRY">
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>-10.000000000000000</double>
</property>
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
......@@ -33,62 +49,38 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Pose</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonDelete">
<property name="maximumSize">
<size>
<width>22</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>X</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxTX">
<property name="maximum">
<double>100000.000000000000000</double>
</property>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>XYZ</string>
<string>RPY</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxTY">
<item row="2" column="3">
<widget class="QDoubleSpinBox" name="doubleSpinBoxTZ">
<property name="minimum">
<double>-100000.000000000000000</double>
</property>
<property name="maximum">
<double>100000.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxTX">
<property name="maximum">
<double>100000.000000000000000</double>
</property>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxRY">
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxRX">
<property name="decimals">
<number>3</number>
</property>
......@@ -98,30 +90,50 @@
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QDoubleSpinBox" name="doubleSpinBoxRZ">
<property name="decimals">
<number>3</number>
</property>
<item row="2" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxTY">
<property name="minimum">
<double>-10.000000000000000</double>
<double>-100000.000000000000000</double>
</property>
<property name="maximum">
<double>10.000000000000000</double>
<double>100000.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>RPY</string>
</property>
</widget>
<item row="1" column="0" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Pose</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonDelete">
<property name="maximumSize">
<size>
<width>22</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>X</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxRX">
<item row="3" column="3">
<widget class="QDoubleSpinBox" name="doubleSpinBoxRZ">
<property name="decimals">
<number>3</number>
</property>
......@@ -131,9 +143,12 @@
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="4" column="1">
<item row="5" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -146,16 +161,30 @@
</property>
</spacer>
</item>
<item row="2" column="3">
<widget class="QDoubleSpinBox" name="doubleSpinBoxTZ">
<property name="minimum">
<double>-100000.000000000000000</double>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>XYZ</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxScale">
<property name="maximum">
<double>100000.000000000000000</double>
<double>1000.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.000000000000000</double>
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Scale</string>
</property>
</widget>
</item>
......
......@@ -5,14 +5,22 @@ namespace armarx
void RobotWidget::addTo(viz::Layer& layer) const
{
const auto adr = reinterpret_cast<std::intptr_t>(this);
layer.add(viz::Robot("Robot_" + std::to_string(adr))
.file(_ui.lineEditProject->text().toStdString(),
_ui.comboBoxFile->currentText().toStdString())
.position(_ui.doubleSpinBoxTX->value(),
_ui.doubleSpinBoxTY->value(),
_ui.doubleSpinBoxTZ->value())
.orientation(_ui.doubleSpinBoxRX->value(),
_ui.doubleSpinBoxRY->value(),
_ui.doubleSpinBoxRZ->value()));
auto r = viz::Robot("Robot_" + std::to_string(adr))
.file(_ui.lineEditProject->text().toStdString(),
_ui.comboBoxFile->currentText().toStdString())
.position(_ui.doubleSpinBoxTX->value(),
_ui.doubleSpinBoxTY->value(),
_ui.doubleSpinBoxTZ->value())
.orientation(_ui.doubleSpinBoxRX->value(),
_ui.doubleSpinBoxRY->value(),
_ui.doubleSpinBoxRZ->value());
if (_ui.checkBoxColor->isChecked())
{
r.overrideColor(viz::Color{static_cast<float>(_ui.doubleSpinBoxR->value()),
static_cast<float>(_ui.doubleSpinBoxG->value()),
static_cast<float>(_ui.doubleSpinBoxB->value()),
static_cast<float>(_ui.doubleSpinBoxA->value())});
}
layer.add(r);
}
}
......@@ -39,10 +39,66 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Robot file</string>
<string>Base XYZ</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="3">
<widget class="QComboBox" name="comboBoxFile">
<property name="editable">
<bool>true</bool>
</property>
<item>
<property name="text">
<string>Armar6RT/robotmodel/Armar6-SH/Armar6-SH.xml</string>
</property>
</item>
<item>
<property name="text">
<string>Armar6RT/robotmodel/Armar6-SH/Armar6-RightHand-v3.xml</string>
</property>
</item>
<item>
<property name="text">
<string>Armar6RT/robotmodel/Armar6-SH/Armar6-LeftHand-v3.xml</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Robot</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonDelete">
<property name="maximumSize">
<size>
<width>22</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>X</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
......@@ -57,28 +113,31 @@
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxTX">
<property name="maximum">
<double>100000.000000000000000</double>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="value">
<double>0.000000000000000</double>
<property name="text">
<string>Project name</string>
</property>
</widget>
</item>
<item row="5" column="3">
<widget class="QDoubleSpinBox" name="doubleSpinBoxRZ">
<property name="decimals">
<number>3</number>
</property>
<item row="4" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxTY">
<property name="minimum">
<double>-10.000000000000000</double>
<double>-100000.000000000000000</double>
</property>
<property name="maximum">
<double>10.000000000000000</double>
<double>100000.000000000000000</double>
</property>
</widget>
</item>
......@@ -89,51 +148,42 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item row="4" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxTX">
<property name="maximum">
<double>100000.000000000000000</double>
</property>
<property name="text">
<string>Project name</string>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Base XYZ</string>
<string>Robot file</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QLineEdit" name="lineEditProject"/>
</item>
<item row="3" column="1" colspan="3">
<widget class="QComboBox" name="comboBoxFile">
<property name="editable">
<bool>true</bool>
<item row="5" column="3">
<widget class="QDoubleSpinBox" name="doubleSpinBoxRZ">
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>-10.000000000000000</double>
</property>
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<item>
<property name="text">
<string>Armar6RT/robotmodel/Armar6-SH/Armar6-SH.xml</string>
</property>
</item>
<item>
<property name="text">
<string>Armar6RT/robotmodel/Armar6-SH/Armar6-RightHand-v3.xml</string>
</property>
</item>
<item>
<property name="text">
<string>Armar6RT/robotmodel/Armar6-SH/Armar6-LeftHand-v3.xml</string>
</property>
</item>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QLineEdit" name="lineEditProject"/>
</item>
<item row="5" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxRX">
<property name="decimals">
......@@ -145,52 +195,65 @@
<property name="maximum">
<double>10.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxTY">
<property name="minimum">
<double>-100000.000000000000000</double>
</property>
<property name="maximum">
<double>100000.000000000000000</double>
<item row="6" column="0">
<widget class="QCheckBox" name="checkBoxColor">
<property name="text">
<string>RGBA</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item row="6" column="1" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Robot</string>
<widget class="QDoubleSpinBox" name="doubleSpinBoxR">
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonDelete">
<property name="maximumSize">
<size>
<width>22</width>
<height>16777215</height>
</size>
<widget class="QDoubleSpinBox" name="doubleSpinBoxG">
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="text">
<string>X</string>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="checkable">
<bool>true</bool>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="doubleSpinBoxB">
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="doubleSpinBoxA">
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
......
......@@ -25,7 +25,7 @@
#include <QWidget>
#include <QMutex>
#include <eigen3/Eigen/Dense>
#include <Eigen/Dense>
#include <valarray>
#include <ArmarXCore/interface/observers/ObserverInterface.h>
#include <ArmarXCore/observers/variant/DatafieldRef.h>
......
#pragma once
#include <Eigen/Dense>
#include <RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h>
#include <VirtualRobot/Robot.h>
......
......@@ -29,7 +29,7 @@
#include <ArmarXCore/core/system/cmake/CMakePackageFinder.h>
#include <ArmarXCore/statechart/xmlstates/profiles/StatechartProfiles.h>
#include <ArmarXCore/util/CPPUtility/trace.h>
#include <ArmarXCore/core/system/ArmarXDataPath.cpp>
// #include <ArmarXCore/core/system/ArmarXDataPath.cpp>
#include <Eigen/Dense>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment