BaxterInterface/rviz_interface/src/RvizInterface.hpp

49 lines
1.2 KiB
C++
Raw Normal View History

2018-08-08 16:13:45 +02:00
/*
* Rviz interface to send objective.
* Composed of 3D marker and a configuration panel.
* @author : antoine.harle@etu.upmc.Fr
* @see : InteractiveObject.cpp/.hpp, InterfacePanel.cpp/.hpp
*/
2018-06-26 18:27:30 +02:00
#ifndef RVIZINTERFACE_HPP
#define RVIZINTERFACE_HPP
#include <ros/ros.h>
#include <interactive_markers/interactive_marker_server.h>
#include <tf/tf.h>
#include "InteractiveObject.hpp"
#include <rviz_interface/InterfaceConfig.h>
#include <rviz_interface/NamedPoint.h>
2018-06-26 18:27:30 +02:00
class RvizInterface
{
protected:
ros::NodeHandle _n;
2018-07-02 11:09:50 +02:00
//Publisher ROS
2018-06-26 18:27:30 +02:00
ros::Publisher _objective_pub;
ros::Publisher _visualization_pub;
2018-07-02 11:09:50 +02:00
//Subscriber ROS
2018-06-26 18:27:30 +02:00
ros::Subscriber _config_sub;
2018-06-29 15:31:04 +02:00
ros::Subscriber _position_sub;
2018-07-02 11:09:50 +02:00
//Serveur de marker interactif
2018-06-26 18:27:30 +02:00
interactive_markers::InteractiveMarkerServer _server;
2018-07-02 11:09:50 +02:00
//Objets de l'interface
2018-06-26 18:27:30 +02:00
std::vector<InteractiveObject*> _objects;
public:
2018-08-17 11:50:56 +02:00
RvizInterface(const std::string & server_topic); //Constructor
~RvizInterface(); //Destructor
2018-06-26 18:27:30 +02:00
2018-08-17 11:50:56 +02:00
void configCallback(const rviz_interface::InterfaceConfig & new_config); //Callback function for the Rviz panel handling configuration changes.
void positionCallback(const rviz_interface::NamedPoint & new_center); //Callback function handling the position updates of markers.
2018-06-26 18:27:30 +02:00
};
#endif