Flatland
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
flatland_server::DebugVisualization Class Reference
Collaboration diagram for flatland_server::DebugVisualization:
Collaboration graph
[legend]

Public Member Functions

void Publish ()
 Publish all marker array topics_ that need publishing.
 
void Visualize (std::string name, b2Body *body, float r, float g, float b, float a)
 Visualize body. More...
 
void Visualize (std::string name, b2Joint *joint, float r, float g, float b, float a)
 Visualize body. More...
 
void VisualizeLayer (std::string name, Body *body)
 Visualize a layer in 2.5d. More...
 
void Reset (std::string name)
 Remove all elements in a visualization topic. More...
 
void BodyToMarkers (visualization_msgs::MarkerArray &markers, b2Body *body, float r, float g, float b, float a)
 Append body as a marker on the marker array. More...
 
void JointToMarkers (visualization_msgs::MarkerArray &markers, b2Joint *joint, float r, float g, float b, float a)
 Append a joint as a marker on the marker array. More...
 
void AddTopicIfNotExist (const std::string &name)
 Ensure that a topic name is being broadcasted. More...
 
void PublishTopicList ()
 Publish topics list.
 

Static Public Member Functions

static DebugVisualizationGet ()
 Return the singleton object.
 

Public Attributes

std::map< std::string, DebugTopictopics_
 
ros::NodeHandle node_
 
ros::Publisher topic_list_publisher_
 

Member Function Documentation

void flatland_server::DebugVisualization::AddTopicIfNotExist ( const std::string &  name)

Ensure that a topic name is being broadcasted.

Parameters
[in]nameName of the topic
void flatland_server::DebugVisualization::BodyToMarkers ( visualization_msgs::MarkerArray &  markers,
b2Body *  body,
float  r,
float  g,
float  b,
float  a 
)

Append body as a marker on the marker array.

Parameters
[in]markersThe output marker array
[in]bodyThe input body pointer
[in]rred color 0.0->1.0
[in]ggreen color 0.0->1.0
[in]bblue color 0.0->1.0
[in]aalpha color 0.0->1.0
void flatland_server::DebugVisualization::JointToMarkers ( visualization_msgs::MarkerArray &  markers,
b2Joint *  joint,
float  r,
float  g,
float  b,
float  a 
)

Append a joint as a marker on the marker array.

Parameters
[in]markersThe output marker array
[in]jointThe input joint pointer
[in]rred color 0.0->1.0
[in]ggreen color 0.0->1.0
[in]bblue color 0.0->1.0
[in]aalpha color 0.0->1.0
void flatland_server::DebugVisualization::Reset ( std::string  name)

Remove all elements in a visualization topic.

Parameters
name
void flatland_server::DebugVisualization::Visualize ( std::string  name,
b2Body *  body,
float  r,
float  g,
float  b,
float  a 
)

Visualize body.

Parameters
[in]nameThe name of the topic
[in]bodyThe body to output
[in]rred color 0.0->1.0
[in]ggreen color 0.0->1.0
[in]bblue color 0.0->1.0
[in]aalpha color 0.0->1.0
void flatland_server::DebugVisualization::Visualize ( std::string  name,
b2Joint *  joint,
float  r,
float  g,
float  b,
float  a 
)

Visualize body.

Parameters
[in]nameThe name of the topic
[in]jointThe join to output
[in]rred color 0.0->1.0
[in]ggreen color 0.0->1.0
[in]bblue color 0.0->1.0
[in]aalpha color 0.0->1.0
void flatland_server::DebugVisualization::VisualizeLayer ( std::string  name,
Body body 
)

Visualize a layer in 2.5d.

Parameters
[in]nameThe name of the topic
[in]jointThe join to output
[in]rred color 0.0->1.0
[in]ggreen color 0.0->1.0
[in]bblue color 0.0->1.0
[in]aalpha color 0.0->1.0

The documentation for this class was generated from the following files: