Robot.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "ElementOps.h"
4 
5 
6 namespace armarx::viz
7 {
8 
9  class Robot : public ElementOps<Robot, data::ElementRobot>
10  {
11  public:
13 
14  Robot& file(std::string const& project, std::string const& filename)
15  {
16  data_->project = project;
17  data_->filename = filename;
18 
19  return *this;
20  }
21 
23  {
24  data_->drawStyle |= data::ModelDrawStyle::COLLISION;
25 
26  return *this;
27  }
28 
30  {
31  data_->drawStyle &= ~data::ModelDrawStyle::COLLISION;
32 
33  return *this;
34  }
35 
37  {
38  data_->drawStyle |= data::ModelDrawStyle::OVERRIDE_COLOR;
39 
40  return color(c);
41  }
42 
44  {
45  data_->drawStyle &= ~data::ModelDrawStyle::OVERRIDE_COLOR;
46 
47  return *this;
48  }
49 
50  Robot& joint(std::string const& name, float value)
51  {
52  data_->jointValues[name] = value;
53 
54  return *this;
55  }
56 
57  Robot& joints(std::map<std::string, float> const& values)
58  {
59  data_->jointValues = values;
60 
61  return *this;
62  }
63 
64  };
65 
66 }
ElementOps.h
armarx::viz::Robot::file
Robot & file(std::string const &project, std::string const &filename)
Definition: Robot.h:14
armarx::viz::Robot::joint
Robot & joint(std::string const &name, float value)
Definition: Robot.h:50
ProsthesisInterface.values
values
Definition: ProsthesisInterface.py:190
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::viz::ElementOps< Robot, data::ElementRobot >::data_
IceInternal::Handle< data::ElementRobot > data_
Definition: ElementOps.h:281
project
std::string project
Definition: VisualizationRobot.cpp:83
armarx::viz::Robot::useFullModel
Robot & useFullModel()
Definition: Robot.h:29
armarx::viz::ElementOps::ElementOps
ElementOps(std::string const &id)
Definition: ElementOps.h:111
armarx::viz::ElementOps
Definition: ElementOps.h:108
armarx::viz::Robot::joints
Robot & joints(std::map< std::string, float > const &values)
Definition: Robot.h:57
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
armarx::viz::Color
Definition: Color.h:13
armarx::viz::Robot::useCollisionModel
Robot & useCollisionModel()
Definition: Robot.h:22
armarx::viz::Robot::overrideColor
Robot & overrideColor(Color c)
Definition: Robot.h:36
armarx::viz::Robot::useOriginalColor
Robot & useOriginalColor()
Definition: Robot.h:43
filename
std::string filename
Definition: VisualizationRobot.cpp:84
armarx::viz::Robot
Definition: Robot.h:9
armarx::viz::ElementOps< Robot, data::ElementRobot >::color
Robot & color(Color color)
Definition: ElementOps.h:195
armarx::viz
This file is part of ArmarX.
Definition: ArVizStorage.cpp:370