13 #ifndef DYNAMIC_GRAPH_BRIDGE_INTERPRETER_HH 14 #define DYNAMIC_GRAPH_BRIDGE_INTERPRETER_HH 16 #include <dynamic_graph_manager/RunCommand.h> 17 #include <dynamic_graph_manager/RunPythonFile.h> 19 #include <dynamic-graph/python/interpreter.hh> 42 typedef boost::function<bool(dynamic_graph_manager::RunCommand::Request&,
43 dynamic_graph_manager::RunCommand::Response&)>
56 typedef boost::function<bool(
57 dynamic_graph_manager::RunPythonFile::Request&,
58 dynamic_graph_manager::RunPythonFile::Response&)>
92 std::string& standard_error);
111 dynamic_graph_manager::RunCommand::Response& res);
123 dynamic_graph_manager::RunPythonFile::Request& req,
124 dynamic_graph_manager::RunPythonFile::Response& res);
bool runCommandCallback(dynamic_graph_manager::RunCommand::Request &req, dynamic_graph_manager::RunCommand::Response &res)
runCommandCallback is the "run_python_command" ros service callback function.
Definition: ros_interpreter.cpp:43
RosPythonInterpreter(ros::NodeHandle &node_handle)
RosPythonInterpreter is the unique constructor of the class.
Definition: ros_interpreter.cpp:16
void start_ros_service()
start_ros_service advertize the "run_python_command" and "run_python_scripts" ros services ...
Definition: ros_interpreter.cpp:30
boost::function< bool(dynamic_graph_manager::RunCommand::Request &, dynamic_graph_manager::RunCommand::Response &)> run_python_command_callback_t
run_python_command_callback_t define a boost::function to be used as callback to the ros::service...
Definition: ros_interpreter.hh:44
This class wraps the implementation of the runCommand service.
Definition: ros_interpreter.hh:29
dynamicgraph::python::Interpreter interpreter_
interpreter_ is the python interpreter itself
Definition: ros_interpreter.hh:130
this is this package namespace in order to avoid naming conflict
Definition: device.hh:22
ros::NodeHandle & ros_node_handle_
ros_node_handle_ is reference to the ros::NodeHandle used to advertize the ros::services ...
Definition: ros_interpreter.hh:135
ros::ServiceServer run_python_file_srv_
run_python_file_srv_ is the "run_python_script" ros::service c++ object
Definition: ros_interpreter.hh:153
~RosPythonInterpreter()
~RosPythonInterpreter is the default destructor of the class
Definition: ros_interpreter.cpp:24
boost::function< bool(dynamic_graph_manager::RunPythonFile::Request &, dynamic_graph_manager::RunPythonFile::Response &)> run_python_file_callback_t
run_python_file_callback_t define a boost::function to be used as callback to the ros::service...
Definition: ros_interpreter.hh:59
ros::ServiceServer run_python_command_srv_
run_python_command_srv_ is the "run_python_command" ros::service c++ object
Definition: ros_interpreter.hh:144
void run_python_file(const std::string ifilename, std::string &standard_error)
run_python_file executes the input scripts in the python interpreter
Definition: ros_interpreter.cpp:70
void run_python_command(const std::string &command, std::string &result, std::string &out, std::string &err)
run_python_command used the python interpreter to execute the input command
Definition: ros_interpreter.cpp:62
bool runPythonFileCallback(dynamic_graph_manager::RunPythonFile::Request &req, dynamic_graph_manager::RunPythonFile::Response &res)
runCommandCallback is the "run_python_script" ros service callback function.
Definition: ros_interpreter.cpp:52