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

JointTrajectoryActionController, does it allocate heap resources?

asked 2012-04-05 00:04:01 -0600

Adolfo Rodriguez T gravatar image

updated 2014-01-28 17:11:53 -0600

ngrennan gravatar image

Hi all,

The JointTrajectoryActionController implementation now contains two action servers, which subscribe to, and publish ROS topics. I'm under the impression that the heap allocations associated to these publishers/subscribers are taking place in the realtime control thread. Is this true?, or am I missing something in the code where a separate thread is spun for this?.

OTOH, the old (non-action) topic interface inherited from the deprecated JointSplineTrajectoryController uses realtime_tools::RealtimePublisher, so those publishers/subscribers do perform their resource allocations in a separate thread.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-04-05 23:30:51 -0600

Lorenz gravatar image

In the current electric implementation, the action servers are actually instantiated in the init method which is called outside the real time loop. When an action goal comes in, the callbacks are executed in the thread that is calling spin (the main thread, not the real time thread for the PR2). The goal callback then sets the goal for the controller running in the realtime loop (joint_trajectory_action_controller.cpp, line 985).

edit flag offensive delete link more


I was missing the greater picture, as I was looking for the non-realtime spinner thread in the controller code, instead of in the pr2_controller_manager infrastructure. Thanks for pointing that out.

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2012-04-08 20:52:37 -0600 )edit

Question Tools


Asked: 2012-04-05 00:04:01 -0600

Seen: 202 times

Last updated: Apr 05 '12