Typedefs | Functions | Variables
look_to_point.cpp File Reference

example on how to subscribe to an image topic and how to make the robot look towards a given direction More...

#include <exception>
#include <string>
#include <boost/shared_ptr.hpp>
#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <actionlib/client/simple_action_client.h>
#include <sensor_msgs/CameraInfo.h>
#include <geometry_msgs/PointStamped.h>
#include <control_msgs/PointHeadAction.h>
#include <sensor_msgs/image_encodings.h>
#include <ros/topic.h>
#include <opencv2/highgui/highgui.hpp>
#include <cv_bridge/cv_bridge.h>
Include dependency graph for look_to_point.cpp:

Go to the source code of this file.

Typedefs

typedef
actionlib::SimpleActionClient
< control_msgs::PointHeadAction > 
PointHeadClient
typedef boost::shared_ptr
< PointHeadClient
PointHeadClientPtr

Functions

void createPointHeadClient (PointHeadClientPtr &actionClient)
void imageCallback (const sensor_msgs::ImageConstPtr &imgMsg)
int main (int argc, char **argv)
void onMouse (int event, int u, int v, int, void *)

Variables

static const std::string cameraFrame = "/xtion_rgb_optical_frame"
static const std::string cameraInfoTopic = "/xtion/rgb/camera_info"
cv::Mat cameraIntrinsics
static const std::string imageTopic = "/xtion/rgb/image_raw"
ros::Time latestImageStamp
PointHeadClientPtr pointHeadClient
static const std::string windowName = "Inside of TIAGo's head"

Detailed Description

example on how to subscribe to an image topic and how to make the robot look towards a given direction

Author:
Jordi Pages.

How to test this application:

1) Launch the application:

$ rosrun tiago_tutorials look_to_point

2) Click on image pixels to make TIAGo look towards that direction

Definition in file look_to_point.cpp.


Typedef Documentation

typedef actionlib::SimpleActionClient<control_msgs::PointHeadAction> PointHeadClient

Definition at line 84 of file look_to_point.cpp.

typedef boost::shared_ptr<PointHeadClient> PointHeadClientPtr

Definition at line 85 of file look_to_point.cpp.


Function Documentation

void createPointHeadClient ( PointHeadClientPtr actionClient)

Definition at line 142 of file look_to_point.cpp.

void imageCallback ( const sensor_msgs::ImageConstPtr &  imgMsg)

Definition at line 94 of file look_to_point.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 163 of file look_to_point.cpp.

void onMouse ( int  event,
int  u,
int  v,
int  ,
void *   
)

Definition at line 106 of file look_to_point.cpp.


Variable Documentation

const std::string cameraFrame = "/xtion_rgb_optical_frame" [static]

Definition at line 76 of file look_to_point.cpp.

const std::string cameraInfoTopic = "/xtion/rgb/camera_info" [static]

Definition at line 78 of file look_to_point.cpp.

Definition at line 81 of file look_to_point.cpp.

const std::string imageTopic = "/xtion/rgb/image_raw" [static]

Definition at line 77 of file look_to_point.cpp.

Definition at line 89 of file look_to_point.cpp.

Definition at line 87 of file look_to_point.cpp.

const std::string windowName = "Inside of TIAGo's head" [static]

Definition at line 75 of file look_to_point.cpp.



look_to_point
Author(s):
autogenerated on Fri Aug 26 2016 13:20:13