8 #include <openrave/plugin.h> 10 #include <ros/node_handle.h> 11 #include <ros/param.h> 16 static char*
argv[1] = {
const_cast<char *
>(
"or_octomap")};
19 const std::string& interfacename,
21 OpenRAVE::EnvironmentBasePtr penv)
23 if (type == OpenRAVE::PT_SensorSystem && interfacename ==
"or_octomap")
25 if (!ros::isInitialized())
31 RAVELOG_DEBUG(
"Using existing ROS node '%s'\n", ros::this_node::getName().c_str());
34 std::map<std::string, std::string> remaps;
35 remaps[
"/cloud_in"] =
"/camera/depth/points";
36 ros::NodeHandle nodeHandle(
"~", remaps);
38 double resolution = 0.05;
39 std::string frameID =
"/map";
40 double maxRange = 2.0;
41 nodeHandle.param(
"resolution", resolution, resolution);
42 nodeHandle.param(
"frame_id", frameID, frameID);
43 nodeHandle.param(
"sensor_model/max_range", maxRange, maxRange);
45 nodeHandle.setParam(
"resolution", resolution);
46 nodeHandle.setParam(
"frame_id", frameID);
47 nodeHandle.setParam(
"sensor_model/max_range", maxRange);
52 return OpenRAVE::InterfaceBasePtr();
57 info.interfacenames[OpenRAVE::PT_SensorSystem].push_back(
"or_octomap");
OpenRAVE::InterfaceBasePtr CreateInterfaceValidated(OpenRAVE::InterfaceType type, const std::string &interfacename, std::istream &sinput, OpenRAVE::EnvironmentBasePtr penv)
void GetPluginAttributesValidated(OpenRAVE::PLUGININFO &info)
OPENRAVE_PLUGIN_API void DestroyPlugin()