27 "ompl_planning.yaml"};
44 RBX_INFO(
"Initializing Fetch with `fetch_{description, moveit_config}`");
49 RBX_INFO(
"Initializing Fetch with `robowflex_resources`");
67 for (
const auto &name : {
"bl_caster",
"br_caster",
"fl_caster",
"fr_caster"})
72 tinyxml2::XMLElement *caster_link = doc.NewElement(
"link");
73 caster_link->SetAttribute(
"name", link_name.c_str());
74 doc.FirstChildElement(
"robot")->InsertFirstChild(caster_link);
77 tinyxml2::XMLElement *caster_joint = doc.NewElement(
"joint");
78 caster_joint->SetAttribute(
"name", joint_name.c_str());
79 caster_joint->SetAttribute(
"type",
"fixed");
81 tinyxml2::XMLElement *parent = doc.NewElement(
"parent");
82 parent->SetAttribute(
"link",
"base_link");
83 caster_joint->InsertFirstChild(parent);
85 tinyxml2::XMLElement *child = doc.NewElement(
"child");
86 child->SetAttribute(
"link", link_name.c_str());
87 caster_joint->InsertFirstChild(child);
89 doc.FirstChildElement(
"robot")->InsertFirstChild(caster_joint);
102 const double pan = atan2(point_pan.translation().y(), point_pan.translation().x());
103 const double tilt = -atan2(point_tilt.translation().z(),
104 hypot(point_tilt.translation().x(), point_tilt.translation().y()));
114 {
"r_gripper_finger_joint", 0.04}};
122 {
"r_gripper_finger_joint", 0.0}};
132 {
"base_joint/x", x}, {
"base_joint/y", y}, {
"base_joint/theta", theta}};
134 scratch_->setVariablePositions(pose);
138 RBX_WARN(
"base_joint does not exist, cannot move base! You need to set addVirtual to true");
static const std::string RESOURCE_SRDF
SRDF from robowflex_resources.
static const std::string DEFAULT_URDF
Default URDF.
static const std::string DEFAULT_SRDF
Default SRDF.
void openGripper()
Opens the Fetch's gripper.
static const std::string RESOURCE_KINEMATICS
kinematics from robowflex_resources
static const std::string RESOURCE_URDF
URDF from robowflex_resources.
static const std::string RESOURCE_LIMITS_LOW
Lower limits from robowflex_resources.
static const std::string RESOURCE_LIMITS
Limits from robowflex_resources.
bool initialize(bool addVirtual=true, bool use_low_limits=false)
Initialize the robot with arm and arm_with_torso kinematics.
void closeGripper()
Closes the Fetch's gripper.
static const std::string DEFAULT_KINEMATICS
Default kinematics.
void setBasePose(double x, double y, double theta)
Sets the base pose of the Fetch robot (a virtual planar joint)
bool addCastersURDF(tinyxml2::XMLDocument &doc)
Inserts the caster links if they don't exist.
void pointHead(const Eigen::Vector3d &point)
Points the Fetch's head to a point in the world frame.
static const std::string DEFAULT_LIMITS
Default Limits.
static const std::string RESOURCE_CONFIG
Planning configuration from robowflex_resources.
bool initialize(const Settings &settings=Settings(), const std::vector< std::string > &adapters=DEFAULT_ADAPTERS)
Initialize the planning context. All parameter provided are defaults.
static const std::string DEFAULT_CONFIG
Default planning configuration.
FetchOMPLPipelinePlanner(const RobotPtr &robot, const std::string &name="")
Constructor.
A robowflex::PipelinePlanner that uses the MoveIt! default OMPL planning pipeline.
bool initialize(const std::string &config_file="", const Settings &settings=Settings(), const std::string &plugin=DEFAULT_PLUGIN, const std::vector< std::string > &adapters=DEFAULT_ADAPTERS)
Initialize planning pipeline. Loads OMPL planning plugin plugin with the planning adapters adapters....
Settings descriptor for settings provided by the default MoveIt! OMPL planning pipeline.
A shared pointer wrapper for robowflex::Robot.
Loads information about a robot and maintains information about a robot's state.
const RobotPose & getLinkTF(const std::string &name) const
Get the current pose of a link on the scratch state.
void setURDFPostProcessFunction(const PostProcessXMLFunction &function)
Sets a post processing function for loading the URDF.
bool isLinkURDF(tinyxml2::XMLDocument &doc, const std::string &name)
Checks if a node link exist with named name_link.
bool initialize(const std::string &urdf_file)
Initializes a robot from a kinematic description. A default semantic description is used.
void setSRDFPostProcessAddPlanarJoint(const std::string &name)
Adds a planar virtual joint through the SRDF to the loaded robot with name name. This joint will have...
bool loadKinematics(const std::string &group, bool load_subgroups=true)
Loads the kinematics plugin for a joint group and its subgroups. No kinematics are loaded by default.
robot_state::RobotStatePtr scratch_
Scratch robot state.
void setState(const std::vector< double > &positions)
Sets the scratch state from a vector of joint positions (all must be specified)
bool hasJoint(const std::string &joint) const
Checks if a joint exists in the robot.
#define RBX_WARN(fmt,...)
Output a warning logging message.
#define RBX_INFO(fmt,...)
Output a info logging message.
Functions for loading and animating robots in Blender.
std::string resolvePackage(const std::string &path)
Resolves package:// URLs to their canonical form. The path does not need to exist,...
Main namespace. Contains all library classes and functions.
std::decay< decltype(std::declval< moveit::core::Transforms >().getTransform("")) >::type RobotPose
A pose (point in SE(3)) used in various functions. Defined from what MoveIt! uses.