Fawkes API
Fawkes Development Version
|
23 #ifndef _PLUGINS_OPENRAVE_ENVIRONMENT_H_
24 #define _PLUGINS_OPENRAVE_ENVIRONMENT_H_
28 #include <openrave/openrave.h>
33 class EnvironmentBase;
53 virtual void set_name(
const char *name);
55 virtual void enable_debug(OpenRAVE::DebugLevel level = OpenRAVE::Level_Debug);
60 OpenRAVE::IkParameterizationType iktype = OpenRAVE::IKP_Transform6D);
64 float sampling = 0.01f);
66 virtual void add_robot(
const std::string &filename);
67 virtual void add_robot(OpenRAVE::RobotBasePtr robot);
70 virtual bool add_object(
const std::string &name,
const std::string &filename);
73 virtual bool rename_object(
const std::string &name,
const std::string &new_name);
74 virtual bool move_object(
const std::string &name,
float trans_x,
float trans_y,
float trans_z);
81 rotate_object(
const std::string &name,
float quat_x,
float quat_y,
float quat_z,
float quat_w);
82 virtual bool rotate_object(
const std::string &name,
float rot_x,
float rot_y,
float rot_z);
87 virtual OpenRAVE::EnvironmentBasePtr
get_env_ptr()
const;
93 std::string name_str_;
95 OpenRAVE::EnvironmentBasePtr env_;
96 OpenRAVE::PlannerBasePtr planner_;
97 OpenRAVE::ModuleBasePtr mod_ikfast_;
99 boost::thread *viewer_thread_;
100 bool viewer_running_;
102 std::vector<OpenRAVE::GraphHandlePtr> graph_handle_;
104 virtual const char *name()
const;
virtual OpenRAVE::EnvironmentBasePtr get_env_ptr() const
Get EnvironmentBasePtr.
virtual bool move_object(const std::string &name, float trans_x, float trans_y, float trans_z)
Move object in the environment.
virtual void start_viewer()
Starts the qt viewer in a separate thread.
RefPtr<> is a reference-counting shared smartpointer.
OpenRaveEnvironment class.
virtual bool delete_object(const std::string &name)
Remove object from environment.
virtual bool rotate_object(const std::string &name, float quat_x, float quat_y, float quat_z, float quat_w)
Rotate object by a quaternion.
OpenRaveEnvironment(fawkes::Logger *logger=0)
Constructor.
virtual void enable_debug(OpenRAVE::DebugLevel level=OpenRAVE::Level_Debug)
Enable debugging messages of OpenRAVE.
virtual void run_graspplanning(const std::string &target_name, OpenRaveRobotPtr &robot, float sampling=0.01f)
Run graspplanning script for a given target.
virtual void create()
Create and lock the environment.
virtual ~OpenRaveEnvironment()
Destructor.
virtual bool add_object(const std::string &name, const std::string &filename)
Add an object to the environment.
Fawkes library namespace.
virtual void disable_debug()
Disable debugging messages of OpenRAVE.
virtual void set_name(const char *name)
Set name of environment.
virtual void add_robot(const std::string &filename)
Add a robot into the scene.
virtual bool delete_all_objects()
Remove all objects from environment.
virtual void load_IK_solver(OpenRaveRobotPtr &robot, OpenRAVE::IkParameterizationType iktype=OpenRAVE::IKP_Transform6D)
Autogenerate IKfast IK solver for robot.
virtual void destroy()
Destroy the environment.
virtual bool rename_object(const std::string &name, const std::string &new_name)
Rename object.
virtual void run_planner(OpenRaveRobotPtr &robot, float sampling=0.01f)
Plan collision-free path for current and target manipulator configuration of a OpenRaveRobot robot.
virtual void clone_objects(OpenRaveEnvironmentPtr &env)
Clone all non-robot objects from a referenced OpenRaveEnvironment to this one.