diff --git a/etc/doxygen/pages/armarpose.dox b/etc/doxygen/pages/armarpose.dox index 1b2b13736d32f4e5478230f657248452e4bd13ea..c3c4b2494f9de2f04f007489180acdfb40b8ce70 100644 --- a/etc/doxygen/pages/armarpose.dox +++ b/etc/doxygen/pages/armarpose.dox @@ -17,7 +17,7 @@ function. \section FramedPose-Possible-Frames Frames of coordinates The frame of FramedX or LinkedX is technically just a string. The possible values are the names of the robot nodes (use \ref RobotAPI-HowTos-RobotViewer "RobotViewer" app of Simox to inspect them). -For global poses the exists the global constant string variable armarx::GlobalFrame located in the FramedPose.h. +For global poses exists the global constant string variable armarx::GlobalFrame located in the FramedPose.h. Use this variable if you specify global poses and an empty Agent-string. Empty frames should be avoided (though, an empty string is mostly considered as the global frame). \section FramedPose-FramedPositionCreation Creation of new FramedPositions diff --git a/source/RobotAPI/components/units/CMakeLists.txt b/source/RobotAPI/components/units/CMakeLists.txt index 94ed1485e1eabb750ad5ae80748008faea129bc6..90567cf96caddb0d174100b504237265888f06a2 100644 --- a/source/RobotAPI/components/units/CMakeLists.txt +++ b/source/RobotAPI/components/units/CMakeLists.txt @@ -74,3 +74,5 @@ set(LIB_FILES ) armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}") + +add_subdirectory(relays) diff --git a/source/RobotAPI/components/units/relays/CMakeLists.txt b/source/RobotAPI/components/units/relays/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..26d539f34c8e5624a614fa891b8f7a19a04f01fd --- /dev/null +++ b/source/RobotAPI/components/units/relays/CMakeLists.txt @@ -0,0 +1,16 @@ +set(LIB_NAME RobotAPIUnitListenerRelays) +armarx_set_target("RobotAPI Unit Listener Relays Library: ${LIB_NAME}") + +set(LIBS ArmarXCore RobotAPIInterfaces) + +set(LIB_HEADERS + KinematicUnitListenerRelay.h + InertialMeasurementUnitListenerRelay.h + ForceTorqueUnitListenerRelay.h + RobotStateListenerRelay.h +) + +set(LIB_FILES syntaxcheck.cpp) + +armarx_add_library("${LIB_NAME}" "${LIB_FILES}" "${LIB_HEADERS}" "${LIBS}") + diff --git a/source/RobotAPI/components/units/relays/ForceTorqueUnitListenerRelay.h b/source/RobotAPI/components/units/relays/ForceTorqueUnitListenerRelay.h new file mode 100644 index 0000000000000000000000000000000000000000..581a1d175f57226d5d93dfc76f18c4bed13cc9e1 --- /dev/null +++ b/source/RobotAPI/components/units/relays/ForceTorqueUnitListenerRelay.h @@ -0,0 +1,56 @@ +/* + * This file is part of ArmarX. + * + * ArmarX is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ArmarX is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * @package VisionX::ArmarXObjects::ForceTorqueUnitListenerRelay + * @author Raphael Grimm ( ufdrv at student dot kit dot edu ) + * @date 2016 + * @copyright http://www.gnu.org/licenses/gpl-2.0.txt + * GNU General Public License + */ +#include <ArmarXCore/core/ManagedIceObject.h> +#include <ArmarXCore/core/util/noop.h> +#include <RobotAPI/interface/units/ForceTorqueUnit.h> + +namespace armarx +{ + class ForceTorqueUnitListenerRelay : + virtual public ManagedIceObject, + virtual public ForceTorqueUnitListener + { + public: + using CallbackFunctionSensorValues = std::function<void(const std::string&, const FramedDirectionBasePtr&, const FramedDirectionBasePtr&)>; + + // ForceTorqueUnitListener interface + virtual void reportSensorValues(const std::string& sensorNodeName, const FramedDirectionBasePtr& forces, const FramedDirectionBasePtr& torques, const Ice::Current& = GlobalIceCurrent) + { + callbackReportSensorValues(sensorNodeName, forces, torques); + } + protected: + // ManagedIceObject interface + virtual void onInitComponent() + { + usingTopic(topicName); + } + virtual void onConnectComponent() {} + virtual std::string getDefaultName() const + { + return "ForceTorqueUnitListenerRelay"; + } + public: + std::string topicName; + CallbackFunctionSensorValues callbackReportSensorValues {noop<const std::string&, const FramedDirectionBasePtr&, const FramedDirectionBasePtr&>}; + }; + using ForceTorqueUnitListenerRelayPtr = IceInternal::Handle<ForceTorqueUnitListenerRelay>; +} diff --git a/source/RobotAPI/components/units/relays/InertialMeasurementUnitListenerRelay.h b/source/RobotAPI/components/units/relays/InertialMeasurementUnitListenerRelay.h new file mode 100644 index 0000000000000000000000000000000000000000..69e2b0c1bab1d394517684a60ab328d3a95ec55d --- /dev/null +++ b/source/RobotAPI/components/units/relays/InertialMeasurementUnitListenerRelay.h @@ -0,0 +1,56 @@ +/* + * This file is part of ArmarX. + * + * ArmarX is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ArmarX is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * @package VisionX::ArmarXObjects::InertialMeasurementUnitListenerRelay + * @author Raphael Grimm ( ufdrv at student dot kit dot edu ) + * @date 2016 + * @copyright http://www.gnu.org/licenses/gpl-2.0.txt + * GNU General Public License + */ +#include <ArmarXCore/core/ManagedIceObject.h> +#include <ArmarXCore/core/util/noop.h> +#include <RobotAPI/interface/units/InertialMeasurementUnit.h> + +namespace armarx +{ + class InertialMeasurementUnitListenerRelay : + virtual public ManagedIceObject, + virtual public InertialMeasurementUnitListener + { + public: + using CallbackFunctionSensorValues = std::function<void(const std::string&, const std::string&, const IMUData&, const TimestampBasePtr&)>; + + // InertialMeasurementUnitListener interface + virtual void reportSensorValues(const std::string& device, const std::string& name, const IMUData& values, const TimestampBasePtr& timestamp, const Ice::Current& = GlobalIceCurrent) + { + callbackReportSensorValues(device, name, values, timestamp); + } + protected: + // ManagedIceObject interface + virtual void onInitComponent() + { + usingTopic(topicName); + } + virtual void onConnectComponent() {} + virtual std::string getDefaultName() const + { + return "InertialMeasurementUnitListenerRelay"; + } + public: + std::string topicName; + CallbackFunctionSensorValues callbackReportSensorValues {noop<const std::string&, const std::string&, const IMUData&, const TimestampBasePtr&>}; + }; + using InertialMeasurementUnitListenerRelayPtr = IceInternal::Handle<InertialMeasurementUnitListenerRelay>; +} diff --git a/source/RobotAPI/components/units/relays/KinematicUnitListenerRelay.h b/source/RobotAPI/components/units/relays/KinematicUnitListenerRelay.h new file mode 100644 index 0000000000000000000000000000000000000000..cbf2d2e2bab5bdc57acadcbb9b78f4fbcca806cb --- /dev/null +++ b/source/RobotAPI/components/units/relays/KinematicUnitListenerRelay.h @@ -0,0 +1,94 @@ +/* + * This file is part of ArmarX. + * + * ArmarX is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ArmarX is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * @package VisionX::ArmarXObjects::KinematicUnitListenerRelay + * @author Raphael Grimm ( ufdrv at student dot kit dot edu ) + * @date 2016 + * @copyright http://www.gnu.org/licenses/gpl-2.0.txt + * GNU General Public License + */ +#include <ArmarXCore/core/ManagedIceObject.h> +#include <ArmarXCore/core/util/noop.h> +#include <RobotAPI/interface/units/KinematicUnitInterface.h> + +namespace armarx +{ + class KinematicUnitListenerRelay : + virtual public ManagedIceObject, + virtual public KinematicUnitListener + { + public: + using CallbackFunctionModes = std::function<void(const NameControlModeMap&, Ice::Long, bool)>; + using CallbackFunctionState = std::function<void(const NameStatusMap&, Ice::Long, bool)>; + using CallbackFunctionValue = std::function<void(const NameValueMap&, Ice::Long, bool)>; + + // KinematicUnitListener interface + virtual void reportControlModeChanged(const NameControlModeMap& map, Ice::Long time, bool changes, const Ice::Current& = GlobalIceCurrent) + { + callbackReportControlModeChanged(map, time, changes); + } + virtual void reportJointAngles(const NameValueMap& map, Ice::Long time, bool changes, const Ice::Current& = GlobalIceCurrent) + { + callbackReportJointAngles(map, time, changes); + } + virtual void reportJointVelocities(const NameValueMap& map, Ice::Long time, bool changes, const Ice::Current& = GlobalIceCurrent) + { + callbackReportJointVelocities(map, time, changes); + } + virtual void reportJointTorques(const NameValueMap& map, Ice::Long time, bool changes, const Ice::Current& = GlobalIceCurrent) + { + callbackReportJointTorques(map, time, changes); + } + virtual void reportJointAccelerations(const NameValueMap& map, Ice::Long time, bool changes, const Ice::Current& = GlobalIceCurrent) + { + callbackReportJointAccelerations(map, time, changes); + } + virtual void reportJointCurrents(const NameValueMap& map, Ice::Long time, bool changes, const Ice::Current& = GlobalIceCurrent) + { + callbackReportJointCurrents(map, time, changes); + } + virtual void reportJointMotorTemperatures(const NameValueMap& map, Ice::Long time, bool changes, const Ice::Current& = GlobalIceCurrent) + { + callbackReportJointMotorTemperatures(map, time, changes); + } + virtual void reportJointStatuses(const NameStatusMap& map, Ice::Long time, bool changes, const Ice::Current& = GlobalIceCurrent) + { + callbackReportJointStatuses(map, time, changes); + } + + protected: + // ManagedIceObject interface + virtual void onInitComponent() + { + usingTopic(topicName); + } + virtual void onConnectComponent() {} + virtual std::string getDefaultName() const + { + return "KinematicUnitListenerRelay"; + } + public: + std::string topicName; + CallbackFunctionModes callbackReportControlModeChanged {noop<const NameControlModeMap&, Ice::Long, bool>}; + CallbackFunctionValue callbackReportJointAngles {noop<const NameValueMap&, Ice::Long, bool>}; + CallbackFunctionValue callbackReportJointVelocities {noop<const NameValueMap&, Ice::Long, bool>}; + CallbackFunctionValue callbackReportJointTorques {noop<const NameValueMap&, Ice::Long, bool>}; + CallbackFunctionValue callbackReportJointAccelerations {noop<const NameValueMap&, Ice::Long, bool>}; + CallbackFunctionValue callbackReportJointCurrents {noop<const NameValueMap&, Ice::Long, bool>}; + CallbackFunctionValue callbackReportJointMotorTemperatures {noop<const NameValueMap&, Ice::Long, bool>}; + CallbackFunctionState callbackReportJointStatuses {noop<const NameStatusMap&, Ice::Long, bool>}; + }; + using KinematicUnitListenerRelayPtr = IceInternal::Handle<KinematicUnitListenerRelay>; +} diff --git a/source/RobotAPI/components/units/relays/RobotStateListenerRelay.h b/source/RobotAPI/components/units/relays/RobotStateListenerRelay.h new file mode 100644 index 0000000000000000000000000000000000000000..839160995c58304031c199884a0e7fbac3517661 --- /dev/null +++ b/source/RobotAPI/components/units/relays/RobotStateListenerRelay.h @@ -0,0 +1,61 @@ +/* + * This file is part of ArmarX. + * + * ArmarX is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ArmarX is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * @package VisionX::ArmarXObjects::KinematicUnitListenerRelay + * @author Raphael Grimm ( ufdrv at student dot kit dot edu ) + * @date 2016 + * @copyright http://www.gnu.org/licenses/gpl-2.0.txt + * GNU General Public License + */ +#include <ArmarXCore/core/ManagedIceObject.h> +#include <ArmarXCore/core/util/noop.h> +#include <RobotAPI/interface/core/RobotState.h> + +namespace armarx +{ + class RobotStateListenerRelay : + virtual public ManagedIceObject, + virtual public RobotStateListenerInterface + { + public: + using CallbackFunctionValue = std::function<void(const NameValueMap& , Ice::Long, bool)>; + using CallbackFunctionPose = std::function<void(const FramedPoseBasePtr &, Ice::Long, bool)>; + + virtual void reportJointValues(const NameValueMap& map, Ice::Long time, bool changes, const Ice::Current& = GlobalIceCurrent) + { + callbackReportJointValues(map, time, changes); + } + void reportGlobalRobotRootPose(const FramedPoseBasePtr & pose, Ice::Long time, bool changes, const Ice::Current& = GlobalIceCurrent) + { + callbackReportGlobalRobotRootPose(pose, time, changes); + } + protected: + // ManagedIceObject interface + virtual void onInitComponent() + { + usingTopic(topicName); + } + virtual void onConnectComponent() {} + virtual std::string getDefaultName() const + { + return "RobotStateListener"; + } + public: + std::string topicName; + CallbackFunctionValue callbackReportJointValues {noop<const NameValueMap& , Ice::Long, bool>}; + CallbackFunctionPose callbackReportGlobalRobotRootPose {noop<const FramedPoseBasePtr &, Ice::Long, bool>}; + }; + using RobotStateListenerRelayPtr = IceInternal::Handle<RobotStateListenerRelay>; +} diff --git a/source/RobotAPI/components/units/relays/syntaxcheck.cpp b/source/RobotAPI/components/units/relays/syntaxcheck.cpp new file mode 100644 index 0000000000000000000000000000000000000000..82b6a31b758ca9668e4219e346f9ae3be5e4a477 --- /dev/null +++ b/source/RobotAPI/components/units/relays/syntaxcheck.cpp @@ -0,0 +1,3 @@ +#include "KinematicUnitListenerRelay.h" +#include "InertialMeasurementUnitListenerRelay.h" +#include "ForceTorqueUnitListenerRelay.h" diff --git a/source/RobotAPI/gui-plugins/DebugDrawerViewer/DebugDrawerViewerWidgetController.cpp b/source/RobotAPI/gui-plugins/DebugDrawerViewer/DebugDrawerViewerWidgetController.cpp index 62653b98433caa6fc0a7161015624b742b03b494..b9b89a1aa2a77401face43df6c20670fbb61dde9 100644 --- a/source/RobotAPI/gui-plugins/DebugDrawerViewer/DebugDrawerViewerWidgetController.cpp +++ b/source/RobotAPI/gui-plugins/DebugDrawerViewer/DebugDrawerViewerWidgetController.cpp @@ -67,7 +67,7 @@ void DebugDrawerViewerWidgetController::onConnectComponent() // create the debugdrawer component std::string debugDrawerComponentName = "GUIDebugDrawer_" + getName(); ARMARX_INFO << "Creating component " << debugDrawerComponentName; - debugDrawer = Component::create<DebugDrawerComponent>(properties, debugDrawerComponentName); + debugDrawer = Component::create<DebugDrawerComponent>(getIceProperties(), debugDrawerComponentName); if (mutex3D) { diff --git a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp index 53a516e7beeeb7119ed6bc04991e58ed9eaa23ff..b04f22369c2d16013d97c12dd9478614d5633e05 100644 --- a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp +++ b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.cpp @@ -32,6 +32,8 @@ #include <ArmarXCore/core/ArmarXObjectScheduler.h> #include <ArmarXCore/core/ArmarXManager.h> +#include <ArmarXCore/util/json/JSONObject.h> + #include <VirtualRobot/XML/RobotIO.h> // Qt headers @@ -44,6 +46,7 @@ #include <QTableView> #include <QCheckBox> #include <QTableWidget> +#include <QClipboard> #include <Inventor/SoDB.h> #include <Inventor/Qt/SoQt.h> @@ -107,7 +110,7 @@ void KinematicUnitWidgetController::onInitComponent() // create the debugdrawer component std::string debugDrawerComponentName = "KinemticUnitGUIDebugDrawer_" + getName(); ARMARX_INFO << "Creating component " << debugDrawerComponentName; - debugDrawer = Component::create<DebugDrawerComponent>(properties, debugDrawerComponentName); + debugDrawer = Component::create<DebugDrawerComponent>(getIceProperties(), debugDrawerComponentName); showVisuLayers(false); if (mutex3D) @@ -160,7 +163,7 @@ void KinematicUnitWidgetController::onConnectComponent() packages.push_back(Application::GetProjectName()); ARMARX_VERBOSE << "ArmarX packages " << packages; - for (const std::string& projectName : packages) + for (const std::string & projectName : packages) { if (projectName.empty()) { @@ -336,6 +339,8 @@ void KinematicUnitWidgetController::saveSettings(QSettings* settings) } + + void KinematicUnitWidgetController::showVisuLayers(bool show) { if (debugDrawer) @@ -351,6 +356,34 @@ void KinematicUnitWidgetController::showVisuLayers(bool show) } } +void KinematicUnitWidgetController::copyToClipboard() +{ + NameValueMap values; + { + boost::recursive_mutex::scoped_lock lock(mutexNodeSet); + + if (selectedControlMode == ePositionControl) + { + values = reportedJointAngles; + } + else if (selectedControlMode == eVelocityControl) + { + values = reportedJointVelocities; + } + } + + JSONObjectPtr serializer = new JSONObject(); + for (auto & kv : values) + { + serializer->setFloat(kv.first, kv.second); + } + const QString json = QString::fromStdString(serializer->asString(true)); + QClipboard* clipboard = QApplication::clipboard(); + clipboard->setText(json); + QApplication::processEvents(); +} + + void KinematicUnitWidgetController::updateGuiElements() { // modelUpdateCB(); @@ -380,6 +413,7 @@ void KinematicUnitWidgetController::connectSlots() connect(ui.radioButtonVelocityControl, SIGNAL(clicked(bool)), this, SLOT(setControlModeVelocity())); connect(ui.radioButtonTorqueControl, SIGNAL(clicked(bool)), this, SLOT(setControlModeTorque())); + connect(ui.copyToClipboard, SIGNAL(clicked()), this, SLOT(copyToClipboard())); connect(ui.showDebugLayer, SIGNAL(toggled(bool)), this, SLOT(showVisuLayers(bool)), Qt::QueuedConnection); connect(this, SIGNAL(jointAnglesReported()), this, SLOT(updateJointAnglesTable()), Qt::QueuedConnection); @@ -858,14 +892,14 @@ void KinematicUnitWidgetController::updateControlModesTable() switch (currentMode) { - /*case eNoMode: - state = "None"; - break; - - case eUnknownMode: - state = "Unknown"; - break; - */ + /*case eNoMode: + state = "None"; + break; + + case eUnknownMode: + state = "Unknown"; + break; + */ case eDisabled: state = "Disabled"; break; @@ -1171,7 +1205,7 @@ void KinematicUnitWidgetController::reportControlModeChanged(const NameControlMo // return; boost::recursive_mutex::scoped_lock lock(mutexNodeSet); - for (auto& e : jointModes) + for (auto & e : jointModes) { // ARMARX_INFO << "Setting jointMode of joint " << e.first << " to " << e.second; diff --git a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.h b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.h index 8ad61492751cd192b24fb7ceaec68dd7f901d1ea..7675b133b391f489aeb9f8d4a4d82067e2a653d9 100644 --- a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.h +++ b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/KinematicUnitGuiPlugin.h @@ -253,6 +253,7 @@ namespace armarx protected slots: void showVisuLayers(bool show); + void copyToClipboard(); private: boost::recursive_mutex mutexNodeSet; diff --git a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/kinematicunitguiplugin.ui b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/kinematicunitguiplugin.ui index 0df7579fe4607e0a75623700567cfc792e3ea7ac..333937df642d635cd235f3433a7637232601e0ac 100644 --- a/source/RobotAPI/gui-plugins/KinematicUnitPlugin/kinematicunitguiplugin.ui +++ b/source/RobotAPI/gui-plugins/KinematicUnitPlugin/kinematicunitguiplugin.ui @@ -46,7 +46,14 @@ </item> <item> <layout class="QGridLayout" name="gridLayout"> - <item row="2" column="2" colspan="2"> + <item row="2" column="0" colspan="2"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Select Joint</string> + </property> + </widget> + </item> + <item row="2" column="2" colspan="3"> <widget class="QComboBox" name="nodeListComboBox"> <property name="enabled"> <bool>true</bool> @@ -59,7 +66,7 @@ </property> </widget> </item> - <item row="3" column="2" colspan="2"> + <item row="3" column="2" colspan="3"> <layout class="QHBoxLayout" name="horizontalLayout"> <item> <widget class="QRadioButton" name="radioButtonPositionControl"> @@ -157,10 +164,7 @@ </item> </layout> </item> - <item row="4" column="2"> - <layout class="QHBoxLayout" name="horizontalLayout_4"/> - </item> - <item row="5" column="3"> + <item row="6" column="4"> <widget class="QCheckBox" name="showDebugLayer"> <property name="text"> <string>debug layer</string> @@ -170,29 +174,24 @@ </property> </widget> </item> - <item row="5" column="2"> - <widget class="QSlider" name="horizontalSliderKinematicUnitPos"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="minimum"> - <number>-100</number> - </property> - <property name="maximum"> - <number>100</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksBelow</enum> + <item row="4" column="2"> + <layout class="QHBoxLayout" name="horizontalLayout_4"/> + </item> + <item row="3" column="0" colspan="2"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Control Mode</string> </property> - <property name="tickInterval"> - <number>0</number> + </widget> + </item> + <item row="6" column="1"> + <widget class="QLabel" name="labelUnit"> + <property name="text"> + <string/> </property> </widget> </item> - <item row="5" column="0"> + <item row="6" column="0"> <widget class="QLCDNumber" name="lcdNumberKinematicUnitJointValue"> <property name="enabled"> <bool>true</bool> @@ -211,24 +210,32 @@ </property> </widget> </item> - <item row="5" column="1"> - <widget class="QLabel" name="labelUnit"> - <property name="text"> - <string/> + <item row="6" column="2"> + <widget class="QSlider" name="horizontalSliderKinematicUnitPos"> + <property name="enabled"> + <bool>true</bool> </property> - </widget> - </item> - <item row="3" column="0" colspan="2"> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>Control Mode</string> + <property name="minimum"> + <number>-100</number> + </property> + <property name="maximum"> + <number>100</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="tickPosition"> + <enum>QSlider::TicksBelow</enum> + </property> + <property name="tickInterval"> + <number>0</number> </property> </widget> </item> - <item row="2" column="0" colspan="2"> - <widget class="QLabel" name="label"> + <item row="6" column="3"> + <widget class="QPushButton" name="copyToClipboard"> <property name="text"> - <string>Select Joint</string> + <string>Copy Values</string> </property> </widget> </item> diff --git a/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp b/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp index 764ff8214e825d22975f2a61274d4cbfa5c6e7f3..d7aa2b8c2c3b3955c0280b36d875cd3f891dee79 100644 --- a/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp +++ b/source/RobotAPI/gui-plugins/RobotViewerPlugin/RobotViewerGuiPlugin.cpp @@ -124,7 +124,7 @@ void RobotViewerWidgetController::onInitComponent() { std::string debugDrawerComponentName = "RobotViewerGUIDebugDrawer_" + getName(); ARMARX_INFO << "Creating component " << debugDrawerComponentName; - debugDrawer = Component::create<DebugDrawerComponent>(properties, debugDrawerComponentName); + debugDrawer = Component::create<DebugDrawerComponent>(getIceProperties(), debugDrawerComponentName); if (mutex3D) {