Currently we replace / into . in each type-attribute (except, the first, with an id).
Here are the lines:
|
if hasattr(_object, '_type') and hasattr(_object, '_slot_types') and hasattr(_object, '__slots__'): # ROS-Specific Type-Declaration |
|
### This is a special CASE for ROS!!!! |
|
self.type = _object._type.replace("/", ".") # Needs to be replaced Fiware does not allow a '/' |
|
self.setPythonMetaData(ipmd, "class") |
|
# Special Case 'Image-like'-Data in ROS (very long 'int8[]'- and 'uint8[]' - arrays) |
|
# These are converted into Base64 (escaped) |
This is not correct. Sadly the OCB has some forbidden Characters, which restricts us (even some messages cannot be sent due to this.)
Iff in the future, some forbidden characters are removed, we should remove the line L122.
here is an example of a publish on something else then the OCB:
{
"angular":{
"type":"geometry_msgs.Vector3",
"value":{
"y":{
"type":"number",
"value":0.0
},
"x":{
"type":"number",
"value":0.0
},
"z":{
"type":"number",
"value":1.0
}
},
"metadata":{...}
},
"linear":{
"type":"geometry_msgs.Vector3",
"value":{
"y":{
"type":"number",
"value":0.0
},
"x":{
"type":"number",
"value":0.0
},
"z":{
"type":"number",
"value":0.0
}
},
"metadata":{...}
},
"type":"geometry_msgs/Twist",
"id":"/turtle1/cmd_vel"
}
It show here two different ROS-Message geometry_msgs/Twist and with a dot geometry_msgs.Vector3. (It would be great to avoid excaping dots after all.)
Currently we replace
/into.in each type-attribute (except, the first, with an id).Here are the lines:
FiwareObjectConverter/ObjectToJson/entityAttribute.py
Lines 120 to 125 in 38d9367
This is not correct. Sadly the OCB has some forbidden Characters, which restricts us (even some messages cannot be sent due to this.)
Iff in the future, some forbidden characters are removed, we should remove the line
L122.here is an example of a publish on something else then the OCB:
{ "angular":{ "type":"geometry_msgs.Vector3", "value":{ "y":{ "type":"number", "value":0.0 }, "x":{ "type":"number", "value":0.0 }, "z":{ "type":"number", "value":1.0 } }, "metadata":{...} }, "linear":{ "type":"geometry_msgs.Vector3", "value":{ "y":{ "type":"number", "value":0.0 }, "x":{ "type":"number", "value":0.0 }, "z":{ "type":"number", "value":0.0 } }, "metadata":{...} }, "type":"geometry_msgs/Twist", "id":"/turtle1/cmd_vel" }It show here two different ROS-Message
geometry_msgs/Twistand with a dotgeometry_msgs.Vector3. (It would be great to avoid excaping dots after all.)