VirtualRobotWriter.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @author Fabian Reister ( fabian dot reister at kit dot edu )
17 * @date 2021
18 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19 * GNU General Public License
20 */
21
22#pragma once
23
24#include <VirtualRobot/VirtualRobot.h>
25
27
28#include "RobotWriter.h"
29
31{
32 /**
33 * @brief The VirtualRobotReader class.
34 *
35 * The aim of this class is to obtain a virtual robot instance and synchronize it
36 * with the data (joint positions, global pose, ...) stored in the working memory.
37 *
38 * This is only a lightweight wrapper of @see RobotReader for Simox's VirtualRobot class.
39 */
40 class VirtualRobotWriter : virtual public RobotWriter
41 {
42 public:
43 VirtualRobotWriter() = default;
45
46 void connect(armem::client::MemoryNameSystem& memoryNameSystem);
48
49 [[nodiscard]] bool storeDescription(const VirtualRobot::Robot& robot,
51
52
53 [[nodiscard]] bool storeState(const VirtualRobot::Robot& robot,
54 const armem::Time& timestamp);
57 };
58
59} // namespace armarx::armem::robot_state
std::string timestamp()
The memory name system (MNS) client.
bool storeDescription(const description::RobotDescription &description, const armem::Time &timestamp=armem::Time::Invalid()) override
bool storeState(const RobotState &state, const std::string &robotTypeName, const std::string &robotName, const std::string &robotRootNodeName) override
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
void registerPropertyDefinitions(::armarx::PropertyDefinitionsPtr &def)
bool storeState(const VirtualRobot::Robot &robot, const armem::Time &timestamp)
bool storeDescription(const VirtualRobot::Robot &robot, const armem::Time &timestamp=armem::Time::Invalid())
static DateTime Invalid()
Definition DateTime.cpp:57
armarx::core::time::DateTime Time
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.