23 #include "openrave_base_thread.h" 25 #include <interfaces/JacoInterface.h> 26 #include <core/threading/mutex.h> 33 #include <plugins/openrave/environment.h> 34 #include <plugins/openrave/robot.h> 35 #include <plugins/openrave/manipulator.h> 36 #include <plugins/openrave/manipulators/kinova_jaco.h> 56 __cfg_OR_auto_load_ik =
false;
58 __plot_current =
false;
67 __viewer_env.env = NULL;
68 __viewer_env.robot = NULL;
69 __viewer_env.manip = NULL;
85 __cfg_OR_use_viewer =
config->
get_bool(
"/hardware/jaco/openrave/use_viewer");
86 __cfg_OR_auto_load_ik =
config->
get_bool(
"/hardware/jaco/openrave/auto_load_ik");
87 __cfg_OR_sampling =
config->
get_float(
"/hardware/jaco/openrave/sampling");
89 __cfg_OR_plot_traj_manip =
config->
get_bool(
"/hardware/jaco/openrave/plotting/planned_manipulator");
90 __cfg_OR_plot_traj_joints =
config->
get_bool(
"/hardware/jaco/openrave/plotting/planned_joints");
91 __cfg_OR_plot_cur_manip =
config->
get_bool(
"/hardware/jaco/openrave/plotting/current_manipulator");
92 __cfg_OR_plot_cur_joints =
config->
get_bool(
"/hardware/jaco/openrave/plotting/current_joints");
97 __viewer_env.env = openrave->get_environment();
98 __viewer_env.env->enable_debug();
99 __viewer_env.env->set_name(
"Viewer");
104 if( __cfg_OR_use_viewer )
105 openrave->start_viewer();
118 __viewer_env.robot = NULL;
119 __viewer_env.manip = NULL;
120 __viewer_env.env = NULL;
134 __plannerparams = params;
148 __plannerparams = params;
159 __plot_current = enable;
virtual ~JacoOpenraveBaseThread()
Destructor.
fawkes::Mutex * __planning_mutex
mutex, used to lock when planning.
Fawkes library namespace.
virtual bool get_bool(const char *path)=0
Get value from configuration which is of type bool.
Thread class encapsulation of pthreads.
virtual void _post_init()
Use this in inheriting classes for post_init stuff, e.g.
virtual void _load_robot()
Use this in inheriting classes to load the OpenRaveRobot.
virtual void finalize()
Finalize the thread.
virtual void set_plannerparams(const std::string ¶ms)
Set planner parameters.
JacoOpenraveBaseThread(const char *name)
Constructor.
Mutex mutual exclusion lock.
Configuration * config
This is the Configuration member used to access the configuration.
virtual void _init()
Use this in inheriting classes for additiona initializations.
virtual float get_float(const char *path)=0
Get value from configuration which is of type float.
virtual void plot_current(bool enable)
Enable/Disable plotting of the current arm position.