chrono::ros::ipc::SubprocessManager Class Reference

Description

Manages the lifecycle of the ROS subprocess and IPC communication.

#include <ChROSSubprocessManager.h>

Public Member Functions

 SubprocessManager (const std::string &node_name, const std::string &channel_name)
 Constructor. More...
 
 ~SubprocessManager ()
 Destructor - automatically terminates subprocess.
 
bool LaunchSubprocess ()
 Launch the ROS subprocess. More...
 
void TerminateSubprocess ()
 Terminate the subprocess gracefully.
 
bool IsSubprocessRunning () const
 Check if subprocess is still running.
 
bool SendMessage (const Message &message)
 Send a message to the subprocess. More...
 
bool ReceiveMessage (Message &message)
 Receive a message from the subprocess (non-blocking) More...
 
IPCChannelGetChannel () const
 Get the IPC channel.
 

Constructor & Destructor Documentation

◆ SubprocessManager()

chrono::ros::ipc::SubprocessManager::SubprocessManager ( const std::string &  node_name,
const std::string &  channel_name 
)

Constructor.

Parameters
node_nameName for the ROS node in the subprocess
channel_nameUnique name for the IPC channel

Member Function Documentation

◆ LaunchSubprocess()

bool chrono::ros::ipc::SubprocessManager::LaunchSubprocess ( )

Launch the ROS subprocess.

Returns
true if successful, false otherwise

◆ ReceiveMessage()

bool chrono::ros::ipc::SubprocessManager::ReceiveMessage ( Message message)

Receive a message from the subprocess (non-blocking)

Parameters
messageOutput message buffer
Returns
true if message received

◆ SendMessage()

bool chrono::ros::ipc::SubprocessManager::SendMessage ( const Message message)

Send a message to the subprocess.

Parameters
messageMessage to send
Returns
true if successful

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_ros/ipc/ChROSSubprocessManager.h
  • /builds/uwsbel/chrono/src/chrono_ros/ipc/ChROSSubprocessManager.cpp