Could FJT feedback msg allocation size be reduced? #98
Unanswered
gavanderhoorn
asked this question in
Q&A
Replies: 1 comment
-
Actually, the feedback msg is on the heap. It's the goal message that's in a static block. So yes, I definitely agree that we should allocate more intelligently. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the current implementation, the FJT action server configures the memory allocation for a feedback message as follows:
motoros2/src/ActionServer_FJT.c
Lines 65 to 71 in f26d997
IIRC and IIUC,
micro_ros_utilities_create_message_memory(..)
will take that configuration and allocate sufficient memory for it (we do that in a static memory block, but still).I'm wondering whether that size could be reduced a bit, as I believe we would have access to the actual nr of axes and groups configured on the controller at that point.
For my controller fi,
MAX_CONTROLLABLE_GROUPS * MP_GRP_AXES_NUM == 8 * 8 == 64
, while the controller actually only has 7 axes (6 inR1
and 1 inB1
). As a feedback message contains quite some fields, reducing these nrs could lead to a significant reduction in memory usage.Edit: perhaps a more elaborate configuration struct should be used there, like what's created for goal message:
motoros2/src/ActionServer_FJT.c
Lines 86 to 105 in f26d997
?
Beta Was this translation helpful? Give feedback.
All reactions