ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

micro-ros serves memory handle

asked 2023-01-05 08:12:18 -0500

bodka gravatar image

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?
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-01-05 08:51:26 -0500

Pablogs gravatar image

Could you please open an issue in our Github repos so we can track this issue?

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-01-05 08:12:18 -0500

Seen: 41 times

Last updated: Jan 05 '23