6#ifndef MSGPACK_DEFINE_MAP
7#define MSGPACK_DEFINE_MAP(...)
19 double joint_angle = 0;
25 int joint_parent,
int joint_type,
26 const std::array<double, 3> &joint_origin_pos,
27 const std::array<double, 3> &joint_origin_rot,
double joint_angle,
28 int geometry_type,
const std::vector<double> &geometry_properties,
30 : name(name), joint_name(joint_name), joint_parent(joint_parent),
31 joint_type(joint_type), joint_origin_pos(joint_origin_pos),
32 joint_origin_rot(joint_origin_rot), joint_angle(joint_angle),
33 geometry_type(geometry_type),
34 geometry_properties(geometry_properties), color(color) {}
36 MSGPACK_NVP(
"jp", joint_parent),
37 MSGPACK_NVP(
"jt", joint_type),
38 MSGPACK_NVP(
"js", joint_origin_pos),
39 MSGPACK_NVP(
"jr", joint_origin_rot),
40 MSGPACK_NVP(
"ja", joint_angle),
41 MSGPACK_NVP(
"gt", geometry_type),
42 MSGPACK_NVP(
"gp", geometry_properties),
43 MSGPACK_NVP(
"c", color))
47 std::vector<std::shared_ptr<RobotLink>>
data;
50 const std::vector<std::shared_ptr<RobotLink>> &data)
51 : field(field), data(data) {}
57 :
public MessageBase<MessageKind::robot_model + MessageKind::res> {
58 unsigned int req_id = 0;
60 std::vector<std::shared_ptr<RobotLink>>
data;
63 const std::vector<std::shared_ptr<RobotLink>> &data)
64 : req_id(req_id), sub_field(sub_field), data(data) {}
66 MSGPACK_NVP(
"d", data))
u8stringとstringとwstringをshared_ptrで持ち共有する
Definition encoding.h:69
#define MSGPACK_DEFINE_MAP(...)
Definition canvas2d.h:10
型からkindを取得するためだけのベースクラス
Definition base.h:53
std::vector< std::shared_ptr< RobotLink > > data
Definition robot_model.h:60
SharedString sub_field
Definition robot_model.h:59
Res(unsigned int req_id, const SharedString &sub_field, const std::vector< std::shared_ptr< RobotLink > > &data)
Definition robot_model.h:62
Definition robot_model.h:13
int color
Definition robot_model.h:22
SharedString name
Definition robot_model.h:14
SharedString joint_name
Definition robot_model.h:15
RobotLink(const SharedString &name, const SharedString &joint_name, int joint_parent, int joint_type, const std::array< double, 3 > &joint_origin_pos, const std::array< double, 3 > &joint_origin_rot, double joint_angle, int geometry_type, const std::vector< double > &geometry_properties, int color)
Definition robot_model.h:24
std::array< double, 3 > joint_origin_pos
Definition robot_model.h:18
int geometry_type
Definition robot_model.h:20
int joint_parent
Definition robot_model.h:16
int joint_type
Definition robot_model.h:17
std::vector< double > geometry_properties
Definition robot_model.h:21
Definition robot_model.h:45
std::vector< std::shared_ptr< RobotLink > > data
Definition robot_model.h:47
RobotModel(const SharedString &field, const std::vector< std::shared_ptr< RobotLink > > &data)
Definition robot_model.h:49
SharedString field
Definition robot_model.h:46
#define WEBCFACE_NS_END
Definition webcface-config.h:104
#define WEBCFACE_NS_BEGIN
Definition webcface-config.h:103