@@ -66,9 +66,11 @@ static void hako_asset_runner_parse_robots(void)
66
66
// name を取得
67
67
robot->name = robot_json[" name" ];
68
68
69
+ // ロボット側が被制御対象のコンフィグファイルなので、READとWRITEは逆になることに注意
70
+
69
71
// PduReaders を取得
70
- if (robot_json.find (" shm_pdu_readers " ) != robot_json.end ()) {
71
- const json& pdu_readers_json = robot_json[" shm_pdu_readers " ];
72
+ if (robot_json.find (" shm_pdu_writers " ) != robot_json.end ()) {
73
+ const json& pdu_readers_json = robot_json[" shm_pdu_writers " ];
72
74
for (const auto & reader_json : pdu_readers_json) {
73
75
PduReader* reader = new PduReader{
74
76
reader_json[" type" ],
@@ -82,8 +84,8 @@ static void hako_asset_runner_parse_robots(void)
82
84
} else {
83
85
// nothing to do
84
86
}
85
- if (robot_json.find (" rpc_pdu_readers " ) != robot_json.end ()) {
86
- const json& pdu_readers_json = robot_json[" shm_pdu_readers " ];
87
+ if (robot_json.find (" rpc_pdu_writers " ) != robot_json.end ()) {
88
+ const json& pdu_readers_json = robot_json[" rpc_pdu_writers " ];
87
89
for (const auto & reader_json : pdu_readers_json) {
88
90
PduReader* reader = new PduReader{
89
91
reader_json[" type" ],
@@ -99,8 +101,8 @@ static void hako_asset_runner_parse_robots(void)
99
101
}
100
102
101
103
// PduWriters を取得
102
- if (robot_json.find (" shm_pdu_writers " ) != robot_json.end ()) {
103
- const json& pdu_writers_json = robot_json[" shm_pdu_writers " ];
104
+ if (robot_json.find (" shm_pdu_readers " ) != robot_json.end ()) {
105
+ const json& pdu_writers_json = robot_json[" shm_pdu_readers " ];
104
106
for (const auto & writer_json : pdu_writers_json) {
105
107
PduWriter* writer = new PduWriter{
106
108
writer_json[" type" ],
@@ -116,8 +118,8 @@ static void hako_asset_runner_parse_robots(void)
116
118
} else {
117
119
// nothing to do
118
120
}
119
- if (robot_json.find (" rpc_pdu_writers " ) != robot_json.end ()) {
120
- const json& pdu_writers_json = robot_json[" shm_pdu_writers " ];
121
+ if (robot_json.find (" rpc_pdu_readers " ) != robot_json.end ()) {
122
+ const json& pdu_writers_json = robot_json[" rpc_pdu_readers " ];
121
123
for (const auto & writer_json : pdu_writers_json) {
122
124
PduWriter* writer = new PduWriter{
123
125
writer_json[" type" ],
0 commit comments