This class wraps the implementation of the runCommand service.
More...
#include <dynamic_graph_bridge/ros_interpreter.hh>
|
typedef boost::function< bool(dynamic_graph_bridge_msgs::RunCommand::Request &, dynamic_graph_bridge_msgs::RunCommand::Response &)> | runCommandCallback_t |
|
typedef boost::function< bool(dynamic_graph_bridge_msgs::RunPythonFile::Request &, dynamic_graph_bridge_msgs::RunPythonFile::Response &)> | runPythonFileCallback_t |
|
|
| Interpreter (ros::NodeHandle &nodeHandle) |
|
void | runCommand (const std::string &command, std::string &result, std::string &out, std::string &err) |
| Method to start python interpreter and deal with messages. More...
|
|
void | runPythonFile (std::string ifilename) |
| Method to parse python scripts. More...
|
|
void | startRosService () |
| Initialize service run_command. More...
|
|
|
bool | runCommandCallback (dynamic_graph_bridge_msgs::RunCommand::Request &req, dynamic_graph_bridge_msgs::RunCommand::Response &res) |
| Run a Python command and return result, stderr and stdout. More...
|
|
bool | runPythonFileCallback (dynamic_graph_bridge_msgs::RunPythonFile::Request &req, dynamic_graph_bridge_msgs::RunPythonFile::Response &res) |
| Run a Python file. More...
|
|
This class wraps the implementation of the runCommand service.
This takes as input a ROS node handle and do not handle the callback so that the service behavior can be controlled from the outside.
◆ runCommandCallback_t
◆ runPythonFileCallback_t
◆ Interpreter()
dynamicgraph::Interpreter::Interpreter |
( |
ros::NodeHandle & |
nodeHandle | ) |
|
|
explicit |
◆ runCommand()
void dynamicgraph::Interpreter::runCommand |
( |
const std::string & |
command, |
|
|
std::string & |
result, |
|
|
std::string & |
out, |
|
|
std::string & |
err |
|
) |
| |
Method to start python interpreter and deal with messages.
- Parameters
-
Command | string to execute, result, stdout, stderr strings. |
◆ runCommandCallback()
bool dynamicgraph::Interpreter::runCommandCallback |
( |
dynamic_graph_bridge_msgs::RunCommand::Request & |
req, |
|
|
dynamic_graph_bridge_msgs::RunCommand::Response & |
res |
|
) |
| |
|
protected |
Run a Python command and return result, stderr and stdout.
◆ runPythonFile()
void dynamicgraph::Interpreter::runPythonFile |
( |
std::string |
ifilename | ) |
|
Method to parse python scripts.
- Parameters
-
◆ runPythonFileCallback()
bool dynamicgraph::Interpreter::runPythonFileCallback |
( |
dynamic_graph_bridge_msgs::RunPythonFile::Request & |
req, |
|
|
dynamic_graph_bridge_msgs::RunPythonFile::Response & |
res |
|
) |
| |
|
protected |
◆ startRosService()
void dynamicgraph::Interpreter::startRosService |
( |
| ) |
|
Initialize service run_command.
The documentation for this class was generated from the following file: