Fixed FRCSim artf2619, and misc reformatting.

Change-Id: I7133f46f88f7e2cb2451c2a6714daa8f3f368b40
This commit is contained in:
Colby Skeggs
2014-07-22 13:10:23 -07:00
parent 461e359484
commit 2dd45c3ea6
5 changed files with 86 additions and 53 deletions

View File

@@ -5,6 +5,7 @@
#include "simulation/msgs/msgs.h"
#include <gazebo/transport/transport.hh>
#include <gazebo/common/Time.hh>
using namespace gazebo;
@@ -12,20 +13,20 @@ class SimEncoder {
public:
SimEncoder(std::string topic);
void Reset();
void Start();
void Stop();
double GetPosition();
double GetVelocity();
void Reset();
void Start();
void Stop();
double GetPosition();
double GetVelocity();
private:
void sendCommand(std::string cmd);
double position, velocity;
transport::SubscriberPtr posSub, velSub;
transport::PublisherPtr commandPub;
void positionCallback(const msgs::ConstFloat64Ptr &msg);
void velocityCallback(const msgs::ConstFloat64Ptr &msg);
void sendCommand(std::string cmd);
double position, velocity;
transport::SubscriberPtr posSub, velSub;
transport::PublisherPtr commandPub;
void positionCallback(const msgs::ConstFloat64Ptr &msg);
void velocityCallback(const msgs::ConstFloat64Ptr &msg);
};
#endif