Namespaces | Functions
graph.cpp File Reference

Implementation for graph functions. More...

#include <yaml-cpp/yaml.h>
#include <fstream>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/foreach.hpp>
#include <bwi_mapper/graph.h>
#include <bwi_mapper/map_utils.h>
#include <bwi_mapper/point_utils.h>
#include <opencv2/opencv_modules.hpp>
Include dependency graph for graph.cpp:

Go to the source code of this file.

Namespaces

namespace  bwi_mapper

Functions

void bwi_mapper::drawArrowOnGraph (cv::Mat &image, const Graph &graph, std::pair< size_t, float > arrow, uint32_t map_width, uint32_t map_height, cv::Scalar color=cv::Scalar(0, 0, 255), uint32_t orig_x=0, uint32_t orig_y=0)
void bwi_mapper::drawArrowOnImage (cv::Mat &image, const cv::Point2f &arrow_center, float orientation, const cv::Scalar &color, int size, int thickness)
void bwi_mapper::drawCircleOnGraph (cv::Mat &image, const Graph &graph, size_t node, cv::Scalar color=cv::Scalar(0, 0, 255), uint32_t orig_x=0, uint32_t orig_y=0)
void bwi_mapper::drawGraph (cv::Mat &image, const Graph &graph, uint32_t orig_x=0, uint32_t orig_y=0, bool put_text=true, bool put_all_edges=true, std::vector< std::pair< size_t, size_t > > specific_edges=std::vector< std::pair< size_t, size_t > >())
 draws the given graph onto an image starting at (orig_x, orig_y)
void bwi_mapper::drawSquareOnGraph (cv::Mat &image, const Graph &graph, size_t node, cv::Scalar color=cv::Scalar(0, 0, 255), uint32_t orig_x=0, uint32_t orig_y=0, int size=30, int thickness=2)
void bwi_mapper::getAdjacentNodes (size_t v, const Graph &graph, std::vector< size_t > &adjacent_vertices)
size_t bwi_mapper::getClosestEdgeOnGraphGivenId (const Point2f &point, const Graph &graph, size_t one_graph_id)
size_t bwi_mapper::getClosestIdOnGraph (const Point2f &point, const Graph &graph, double threshold=0.0)
size_t bwi_mapper::getClosestIdOnGraphFromEdge (const Point2f &point, const Graph &graph, size_t prev_graph_id)
float bwi_mapper::getEuclideanDistance (size_t u, size_t v, const Graph &graph)
Point2f bwi_mapper::getLocationFromGraphId (int idx, const Graph &graph)
float bwi_mapper::getNodeAngle (size_t u, size_t v, const Graph &graph)
float bwi_mapper::getShortestPathDistance (size_t start_idx, size_t goal_idx, const Graph &graph)
float bwi_mapper::getShortestPathWithDistance (size_t start_idx, size_t goal_idx, std::vector< size_t > &path_from_goal, const Graph &graph)
void bwi_mapper::getVisibleNodes (size_t v, const Graph &graph, const nav_msgs::OccupancyGrid &grid, std::vector< size_t > &visible_vertices, float visibility_range=0.0f)
bool bwi_mapper::isVisible (size_t u, size_t v, const Graph &graph, const nav_msgs::OccupancyGrid &map)
void bwi_mapper::readGraphFromFile (const std::string &filename, const nav_msgs::MapMetaData &info, Graph &graph)
void bwi_mapper::writeGraphToFile (const std::string &filename, const Graph &graph, const nav_msgs::MapMetaData &info)

Detailed Description

Implementation for graph functions.

Author:
Piyush Khandelwal (piyushk@cs.utexas.edu)

Copyright (c) 2013, UT Austin

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the <organization> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT holder>=""> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

$ Id: 04/18/2013 05:10:28 PM piyushk $

Definition in file graph.cpp.



bwi_mapper
Author(s): Piyush Khandelwal
autogenerated on Thu Jun 6 2019 17:57:21