micro-ros serves memory handle
hi all. im using foxy and teensy 3.5 with micro ros. i tring to use costume srv (GraspObject.srv):
int32 data
string gripper_name
---
bool success
whan i tring to assign the memory for the string:
picko_core_msgs__srv__GraspObject_Request req_grasp_object;
req_grasp_object.gripper_name.capacity = 20;
req_grasp_object.gripper_name.data = (char*) malloc(mymsg.values.capacity * sizeof(char));
req_grasp_object.gripper_name.size = 0;
i get the error:
WARNING: library micro_ros_arduino-2.0.5-foxy claims to run on stm32, OpenCR, Teensyduino, samd, sam, mbed, esp32, mbed_portenta architecture(s) and may be incompatible with your current board which runs on avr architecture(s).
/home/picko/Arduino/micro-ros_addtwoints_service/micro-ros_addtwoints_service.ino:60:1: error: 'req_grasp_object' does not name a type
req_grasp_object.gripper_name.capacity = 20;
^
/home/picko/Arduino/micro-ros_addtwoints_service/micro-ros_addtwoints_service.ino:61:1: error: 'req_grasp_object' does not name a type
req_grasp_object.gripper_name.data = (char*) malloc(mymsg.values.capacity * sizeof(char));
^
/home/picko/Arduino/micro-ros_addtwoints_service/micro-ros_addtwoints_service.ino:62:1: error: 'req_grasp_object' does not name a type
req_grasp_object.gripper_name.size = 0;
^
its my first time using micro-ros and i take the exmple from : https://micro.ros.org/docs/tutorials/...
- the other serves in the micro-ros side that doesn't need memory handling working good. any help?