Open dudu8009 opened 3 weeks ago
You may follow my wiki. https://github.com/hippo5329/micro_ros_arduino_examples_platformio/wiki
The count in executer init is the total number of timers and subscribers.
In most cases, only one timer is enough. Eg, one 50Hz control loop timer can be used to derive the other slower timings.
The allocation of publishers, subscribers and services is assigned by the colcon meta. You may find an example in the esp32 env.
Example of derived timer in hippo5329/linorobot2_hardware
In 50Hz control timer,
EXECUTE_EVERY_N_MS(RANGE_TIMER, { range_msg = getRange(); range_msg.header.stamp.sec = time_stamp.tv_sec; range_msg.header.stamp.nanosec = time_stamp.tv_nsec; RCSOFTCHECK(rcl_publish(&range_publisher, &range_msg, NULL)) });
Issue template
I'm trying to run 5 timers from one esp32 dev board and so far it fails to run, i would like to know how can i set the max number of timers higher, also i haven't understood what is the proper flow to init a node with subscribers, publishers and timers and how to properly clean up. that is, what is the correct order of init for the different entities and shutdown? i haven't found a demo of this, and currently the micro_ros_platformio repo doesn't have a lot of demos
Code example