ed
Namespaces | Functions
shape_loader.cpp File Reference
#include "shape_loader_private.h"
#include "ed/models/shape_loader.h"
#include "xml_shape_parser.h"
#include <tue/filesystem/path.h>
#include <geolib/CompositeShape.h>
#include <geolib/io/import.h>
#include <geolib/serialization.h>
#include <geolib/Shape.h>
#include "polypartition/polypartition.h"
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <sstream>
#include <iostream>
Include dependency graph for shape_loader.cpp:

Go to the source code of this file.

Namespaces

 ed
 
 ed::models
 

Functions

void ed::models::createCylinder (geo::Shape &shape, double radius, double height, int num_corners=12)
 createCylinder create a mesh from radius and height More...
 
void ed::models::createPolygon (geo::Shape &shape, const std::vector< geo::Vec2 > &points, double height, std::stringstream &error, bool create_bottom=true)
 createPolygon create polygon mesh from points More...
 
void ed::models::createSphere (geo::Shape &shape, double radius, uint recursion_level=2)
 createSphere Create a shape of sphere More...
 
void ed::models::findContours (const cv::Mat &image, const geo::Vec2i &p_start, int d_start, std::vector< geo::Vec2i > &points, std::vector< geo::Vec2i > &line_starts, cv::Mat &contour_map)
 findContours More...
 
geo::ShapePtr ed::models::getHeightMapShape (const std::string &image_filename, const geo::Vec3 &pos, const double blockheight, const double resolution_x, const double resolution_y, const bool inverted, std::stringstream &error)
 getHeightMapShape convert grayscale image in a heigtmap mesh More...
 
geo::ShapePtr ed::models::getHeightMapShape (const std::string &image_filename, const geo::Vec3 &pos, const geo::Vec3 &size, const bool inverted, std::stringstream &error)
 getHeightMapShape convert grayscale image in a heigtmap mesh More...
 
geo::ShapePtr ed::models::getHeightMapShape (const std::string &image_filename, tue::config::Reader cfg, std::stringstream &error)
 getHeightMapShape convert grayscale image in a heigtmap mesh More...
 
geo::ShapePtr ed::models::getHeightMapShape (cv::Mat &image_orig, const geo::Vec3 &pos, const geo::Vec3 &size, const bool inverted, std::stringstream &error)
 getHeightMapShape convert grayscale image in a heigtmap mesh More...
 
uint ed::models::getMiddlePoint (geo::Mesh &mesh, uint i1, uint i2, std::map< unsigned long, uint > cache, double radius)
 getMiddlePoint Gets the middle point of two points in a mesh of a sphere. Uses a cache to not create double points. The new point is placed on the radius of the sphere. More...
 
static std::string ed::models::getUriPath (std::string type)
 getUriPath searches GAZEBO_MODEL_PATH and GAZEBO_RESOURCH_PATH for file More...
 
geo::ShapePtr ed::models::loadShape (const std::string &model_path, tue::config::Reader cfg, std::map< std::string, geo::ShapePtr > &shape_cache, std::stringstream &error)
 loadShape load the shape of a model. More...
 
std::string ed::models::parseURI (const std::string &uri, ModelOrFile &uri_type)
 
bool ed::models::readPose (tue::config::Reader &cfg, geo::Pose3D &pose, tue::config::RequiredOrOptional pos_req=tue::config::REQUIRED, tue::config::RequiredOrOptional rot_req=tue::config::OPTIONAL)
 readPose read pose into Pose3D. Both ED yaml and SDF. Also reads pos(position) of SDF. More...
 
void ed::models::readVec3 (tue::config::Reader &cfg, geo::Vec3 &v, tue::config::RequiredOrOptional pos_req=tue::config::REQUIRED)
 readVec3 read x, y and z into a vector More...
 
bool ed::models::readVec3Group (tue::config::Reader &cfg, geo::Vec3 &v, const std::string &vector_name, tue::config::RequiredOrOptional=tue::config::REQUIRED)
 readVec3Group read a config group into a Vec3 More...
 
std::vector< std::stringed::models::split (const std::string &strToSplit, char delimeter)
 split Implementation by using delimiter as a character. Multiple delimeters are removed. More...