23#include "openrave_base_thread.h"
25#include <core/threading/mutex.h>
26#include <interfaces/JacoInterface.h>
33# include <plugins/openrave/environment.h>
34# include <plugins/openrave/manipulator.h>
35# include <plugins/openrave/manipulators/kinova_jaco.h>
36# include <plugins/openrave/robot.h>
37using namespace OpenRAVE;
56 cfg_OR_auto_load_ik_ =
false;
57 plot_current_ =
false;
65 viewer_env_.env = NULL;
66 viewer_env_.robot = NULL;
67 viewer_env_.manip = NULL;
83 cfg_OR_use_viewer_ =
config->
get_bool(
"/hardware/jaco/openrave/use_viewer");
84 cfg_OR_auto_load_ik_ =
config->
get_bool(
"/hardware/jaco/openrave/auto_load_ik");
85 cfg_OR_sampling_ =
config->
get_float(
"/hardware/jaco/openrave/sampling");
87 cfg_OR_plot_traj_manip_ =
88 config->
get_bool(
"/hardware/jaco/openrave/plotting/planned_manipulator");
89 cfg_OR_plot_traj_joints_ =
config->
get_bool(
"/hardware/jaco/openrave/plotting/planned_joints");
90 cfg_OR_plot_cur_manip_ =
config->
get_bool(
"/hardware/jaco/openrave/plotting/current_manipulator");
91 cfg_OR_plot_cur_joints_ =
config->
get_bool(
"/hardware/jaco/openrave/plotting/current_joints");
96 viewer_env_.env = openrave->get_environment();
97 viewer_env_.env->enable_debug();
98 viewer_env_.env->set_name(
"Viewer");
103 if (cfg_OR_use_viewer_)
104 openrave->start_viewer();
117 viewer_env_.robot = NULL;
118 viewer_env_.manip = NULL;
119 viewer_env_.env = NULL;
133 plannerparams_ = params;
147 plannerparams_ = params;
158 plot_current_ = enable;
JacoOpenraveBaseThread(const char *name)
Constructor.
virtual void plot_current(bool enable)
Enable/Disable plotting of the current arm position.
fawkes::Mutex * planning_mutex_
mutex, used to lock when planning.
virtual void _init()
Use this in inheriting classes for additiona initializations.
virtual void _post_init()
Use this in inheriting classes for post_init stuff, e.g.
virtual ~JacoOpenraveBaseThread()
Destructor.
virtual void finalize()
Finalize the thread.
virtual void _load_robot()
Use this in inheriting classes to load the OpenRaveRobot.
virtual void set_plannerparams(const std::string ¶ms)
Set planner parameters.
Configuration * config
This is the Configuration member used to access the configuration.
virtual bool get_bool(const char *path)=0
Get value from configuration which is of type bool.
virtual float get_float(const char *path)=0
Get value from configuration which is of type float.
Mutex mutual exclusion lock.
Thread class encapsulation of pthreads.
Fawkes library namespace.