Closed DatSpace closed 1 year ago
- Is that a known bug and is there something I can do to avoid it ?
I was not aware that new incoming tasks create new threads. Could you send a backtrace of this, please, to understand where the thread gets created? The error msg is related to CycloneDDS: https://github.com/ros2/rmw_cyclonedds/issues/268
- Is there a function I can call to clear the task from the panel programmatically?
In the TaskPanel settings you can configure how to deal with old tasks. You can automatically remove them, for example.
- How can I disable the publishing of the solutions at all for a task?
Simply disable introspection: task->enableIntrospection(false);
Thank you for your answer. Here is the rviz backtrace:
Looks like CycloneDDS can only handle a fixed amount of threads. For each incoming message a new thread is started to process that message. Closing here as this isn‘t a bug in MTC.
I am planning with task constructor again and again. On RViz the task are added normally, but because I might be planning 1 task per second, it adds up pretty quickly.
It seems that for every task published a thread is created to hold all the trajectories etc which is understandable but it quickly builds up the thread count. On my setup rviz crashes with:
[rviz2-5] 1670093332.162819 [] rviz2: create_thread: rviz2: no free slot
at around 105 threads on the process. The memory used by the rviz process is more than 2GB, while at the start its less than 1GB.
While the plans are added to the panel, if I select all and clear the threads are destroyed and the memory drops, but manually clearing is not an option.
1) Is that a known bug and is there something I can do to avoid it ? 2) Is there a function I can call to clear the task from the panel programmatically? 3) How can I disable the publishing of the solutions at all for a task? a) I tried disabling introspection but I also need to be able to access the stage id's which I believe are not available:
moveit_task_constructor_msgs::msg::Solution solution;
task->solutions().front()->fillMessage(solution, &task->introspection());
Using ros2 humble, with the latest released moveit and latest task constructor in a doker container.