ArVizDrawer.cpp
Go to the documentation of this file.
1#include "ArVizDrawer.h"
2
3#include <iomanip>
4#include <sstream>
5#include <string>
6
8
10{
11
13 {
14 }
15
17 {
18 // make sure, the Arviz Ice calls are handled.
19 // {
20 // std::unique_lock g{layerMtx};
21 // g.lock();
22 // }
23 }
24
25 inline std::string
26 nameWithId(const std::string& name, const int id, const unsigned int idWidth = 6)
27 {
28 std::stringstream ss;
29 ss << name << "_" << std::setw(static_cast<int>(idWidth)) << std::setfill('0') << id;
30 return ss.str();
31 }
32
33 inline std::string
34 nameWithIds(const std::string& name,
35 const int id,
36 const int subId,
37 const unsigned int idWidth = 6)
38 {
39 std::stringstream ss;
40 ss << name << "_" << std::setw(static_cast<int>(idWidth)) << std::setfill('0') << id << "_"
41 << std::setw(static_cast<int>(idWidth)) << std::setfill('0') << subId;
42 return ss.str();
43 }
44
45 void
47 {
48 auto layer = arviz.layer("my_layer_name");
49
50 // TODO: populate layer, e.g.
51 // odomLayer.add(viz::Pose("odom").pose(odomPose.translation() * 1000, odomPose.linear()));
52
53 arviz.commit(layer);
54 }
55
56} // namespace armarx::navigation::components::dynamic_scene_provider
std::string nameWithId(const std::string &name, const int id, const unsigned int idWidth=6)
std::string nameWithIds(const std::string &name, const int id, const int subId, const unsigned int idWidth=6)