Commit 7a176344 authored by James Ward's avatar James Ward
Browse files

Rename service

parent 718242fa
#include <QVBoxLayout>
#include "cam_lidar_panel.h"
#include <cam_lidar_calibration/Sample.h>
#include <cam_lidar_calibration/Optimise.h>
namespace cam_lidar_calibration
{
CamLidarPanel::CamLidarPanel(QWidget* parent) : rviz::Panel(parent)
{
sample_client_ = nh_.serviceClient<cam_lidar_calibration::Sample>("sample");
optimise_client_ = nh_.serviceClient<cam_lidar_calibration::Sample>("optimise");
optimise_client_ = nh_.serviceClient<cam_lidar_calibration::Optimise>("optimiser");
QVBoxLayout* button_layout = new QVBoxLayout;
capture_button_ = new QPushButton("Capture sample");
......@@ -27,22 +26,22 @@ CamLidarPanel::CamLidarPanel(QWidget* parent) : rviz::Panel(parent)
void CamLidarPanel::captureSample()
{
Sample srv;
srv.request.operation = Sample::Request::CAPTURE;
sample_client_.call(srv);
Optimise srv;
srv.request.operation = Optimise::Request::CAPTURE;
optimise_client_.call(srv);
}
void CamLidarPanel::discardSample()
{
Sample srv;
srv.request.operation = Sample::Request::DISCARD;
sample_client_.call(srv);
Optimise srv;
srv.request.operation = Optimise::Request::DISCARD;
optimise_client_.call(srv);
}
void CamLidarPanel::optimise()
{
Sample srv;
srv.request.operation = Sample::Request::OPTIMISE;
Optimise srv;
srv.request.operation = Optimise::Request::OPTIMISE;
optimise_client_.call(srv);
}
......
......@@ -41,9 +41,7 @@ protected Q_SLOTS:
protected:
// The ROS node handle.
ros::NodeHandle nh_;
ros::ServiceClient sample_client_;
ros::ServiceClient optimise_client_; // TODO
// Remove when everything is in the same node
ros::ServiceClient optimise_client_;
QPushButton* capture_button_;
QPushButton* discard_button_;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment