All Classes Namespaces Files Functions Variables Typedefs
Functions | Variables
rviz_object.cpp File Reference
#include <ros/ros.h>
#include <string>
#include <std_msgs/Float32.h>
#include <std_msgs/Bool.h>
#include <visualization_msgs/Marker.h>
Include dependency graph for rviz_object.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 Main method of the rviz_object node. This node evaluates the distance published by phidget_reader. More...
 
void rvizUpdater (const std_msgs::Float32::ConstPtr &msg)
 Method for publishing a cylinder in rviz. More...
 
void shutdown (const std_msgs::Bool::ConstPtr &b)
 Controll method to shutdown this ROS node when the command is given. More...
 

Variables

bool added = false
 
ros::Publisher cylinder_pub
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Main method of the rviz_object node. This node evaluates the distance published by phidget_reader.

If there is an object in sight of the sensor this nod publishes a marker at the distance measured by the sensor in rviz. If there is no object in the sight of the sensor the cylinder will be deleted. This node also listens to the shutdown command given by the controller.

Definition at line 24 of file rviz_object.cpp.

void rvizUpdater ( const std_msgs::Float32::ConstPtr &  msg)

Method for publishing a cylinder in rviz.

This Method creates a marker message to create a cylinder in rviz. The frame where the marker in will be plotted in rviz is the base frame of the gripper. The marker will be deleted if there is no object in the range of the sensor. The type of the marker is a cylinder. Marker will be placed on the y-axis on the measured distance from the origin The size of the marker is determined with the diameter and height variable. The color of the marker is green.

void shutdown ( const std_msgs::Bool::ConstPtr &  b)

Controll method to shutdown this ROS node when the command is given.

This method will shutdown this node when the command is given by the console.

Parameters
bThe message containing the command. Nothing is done with the command since we know what it will be when this message is received.

Variable Documentation

bool added = false

Cylinder added value

Definition at line 14 of file rviz_object.cpp.

ros::Publisher cylinder_pub

cylinder publisher.

Definition at line 11 of file rviz_object.cpp.



Grijper
Author(s): Stijn van Schooten, Wybren ten Cate, Florens Kreuk, Jan Wymenga,Joris Coenen, Roy Groot
autogenerated on Thu Oct 3 2013 22:59:42