AGX Dynamics  2.37.3.2
agxROS2 Namespace Reference

Classes

class  ROS2ClockPublisher
 
class  ROS2ControlInterface
 Possible to add joints (Constraint1DOF) and the listener will publish the position and velocity for the joints as a sensorMsgs/JointState aswell as listens to commands to control said joint. More...
 

Typedefs

typedef agx::observer_ptr< const ROS2ControlInterface > ROS2ControlInterfaceConstObserver
 
typedef agx::ref_ptr< const ROS2ControlInterface > ROS2ControlInterfaceConstRef
 
typedef agx::observer_ptr< ROS2ControlInterface > ROS2ControlInterfaceObserver
 
typedef agx::ref_ptr< ROS2ControlInterface > ROS2ControlInterfaceRef
 

Functions

template<typename ContainerT >
void freeContainerMemory (ContainerT &container)
 Free the memory held by the given container by swapping it with a default-constructed instance. More...
 

Typedef Documentation

◆ ROS2ControlInterfaceConstObserver

◆ ROS2ControlInterfaceConstRef

◆ ROS2ControlInterfaceObserver

◆ ROS2ControlInterfaceRef

Function Documentation

◆ freeContainerMemory()

template<typename ContainerT >
void agxROS2::freeContainerMemory ( ContainerT &  container)

Free the memory held by the given container by swapping it with a default-constructed instance.

This is required when an application is using a different system allocator than the AGX Dynamics shared library and a container is passed by-value from AGX Dynamics to the application. When the container goes out of scope the application's system allocator will try to deallocate the container's buffer, a buffer that was allocated with AGX Dynamics' system allocator. This will either cause memory errors or a crash. By first calling freeContainerMemory the buffer will be freed inside AGX Dynamics, with AGX Dynamics' system allocator, and the application's system allocator will not need to do anything.