Skip to content

Commit 0e2d46b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 04e12f6 commit 0e2d46b

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

src/sot-tiago-controller.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ boost::condition_variable cond;
3131
boost::mutex mut;
3232
bool data_ready;
3333

34-
void workThread(SoTTiagoController *aSoTTiago) {
34+
void workThread(SoTTiagoController* aSoTTiago) {
3535
dynamicgraph::Interpreter aLocalInterpreter(
3636
dynamicgraph::rosInit(false, true));
3737

@@ -69,27 +69,27 @@ void SoTTiagoController::init() {
6969
SoTTiagoController::~SoTTiagoController() {}
7070

7171
void SoTTiagoController::setupSetSensors(
72-
map<string, dgsot::SensorValues> &SensorsIn) {
72+
map<string, dgsot::SensorValues>& SensorsIn) {
7373
device_->setupSetSensors(SensorsIn);
7474
}
7575

7676
void SoTTiagoController::nominalSetSensors(
77-
map<string, dgsot::SensorValues> &SensorsIn) {
77+
map<string, dgsot::SensorValues>& SensorsIn) {
7878
device_->nominalSetSensors(SensorsIn);
7979
}
8080

8181
void SoTTiagoController::cleanupSetSensors(
82-
map<string, dgsot::SensorValues> &SensorsIn) {
82+
map<string, dgsot::SensorValues>& SensorsIn) {
8383
device_->cleanupSetSensors(SensorsIn);
8484
}
8585

8686
void SoTTiagoController::getControl(
87-
map<string, dgsot::ControlValues> &controlOut) {
87+
map<string, dgsot::ControlValues>& controlOut) {
8888
try {
8989
sotDEBUG(25) << __FILE__ << __FUNCTION__ << "(#" << __LINE__ << ")" << endl;
9090
device_->getControl(controlOut);
9191
sotDEBUG(25) << __FILE__ << __FUNCTION__ << "(#" << __LINE__ << ")" << endl;
92-
} catch (dynamicgraph::sot::ExceptionAbstract &err) {
92+
} catch (dynamicgraph::sot::ExceptionAbstract& err) {
9393
std::cout << __FILE__ << " " << __FUNCTION__ << " (" << __LINE__ << ") "
9494
<< err.getStringMessage() << endl;
9595
throw err;
@@ -102,9 +102,9 @@ void SoTTiagoController::setSecondOrderIntegration(void) {
102102
device_->setSecondOrderIntegration();
103103
}
104104

105-
void SoTTiagoController::runPython(std::ostream &file,
106-
const std::string &command,
107-
dynamicgraph::Interpreter &interpreter) {
105+
void SoTTiagoController::runPython(std::ostream& file,
106+
const std::string& command,
107+
dynamicgraph::Interpreter& interpreter) {
108108
file << ">>> " << command << std::endl;
109109
std::string lerr(""), lout(""), lres("");
110110
interpreter.runCommand(command, lres, lout, lerr);

src/sot-tiago-controller.hh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ class SoTTiagoController : public dgsot::AbstractSotExternalInterface {
3232
SoTTiagoController(std::string robotName);
3333
virtual ~SoTTiagoController();
3434

35-
void setupSetSensors(std::map<std::string, dgsot::SensorValues> &sensorsIn);
35+
void setupSetSensors(std::map<std::string, dgsot::SensorValues>& sensorsIn);
3636

37-
void nominalSetSensors(std::map<std::string, dgsot::SensorValues> &sensorsIn);
37+
void nominalSetSensors(std::map<std::string, dgsot::SensorValues>& sensorsIn);
3838

39-
void cleanupSetSensors(std::map<std::string, dgsot::SensorValues> &sensorsIn);
39+
void cleanupSetSensors(std::map<std::string, dgsot::SensorValues>& sensorsIn);
4040

41-
void getControl(std::map<std::string, dgsot::ControlValues> &anglesOut);
41+
void getControl(std::map<std::string, dgsot::ControlValues>& anglesOut);
4242

4343
void setNoIntegration(void);
4444
void setSecondOrderIntegration(void);
@@ -49,16 +49,16 @@ class SoTTiagoController : public dgsot::AbstractSotExternalInterface {
4949
protected:
5050
// Update output port with the control computed from the
5151
// dynamic graph.
52-
void updateRobotState(std::vector<double> &anglesIn);
52+
void updateRobotState(std::vector<double>& anglesIn);
5353

54-
void runPython(std::ostream &file, const std::string &command,
55-
dynamicgraph::Interpreter &interpreter);
54+
void runPython(std::ostream& file, const std::string& command,
55+
dynamicgraph::Interpreter& interpreter);
5656

5757
virtual void startupPython();
5858

5959
void init();
6060

61-
SoTTiagoDevice *device_;
61+
SoTTiagoDevice* device_;
6262
};
6363

6464
#endif /* _SOT_TiagoController_H_ */

src/sot-tiago-device.hh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ class SoTTiagoDevice : public dgsot::Device {
3535
static const std::string CLASS_NAME;
3636
static const double TIMESTEP_DEFAULT;
3737

38-
virtual const std::string &getClassName() const { return CLASS_NAME; }
38+
virtual const std::string& getClassName() const { return CLASS_NAME; }
3939

4040
SoTTiagoDevice(std::string RobotName);
4141
virtual ~SoTTiagoDevice();
4242

43-
void setSensors(std::map<std::string, dgsot::SensorValues> &sensorsIn);
43+
void setSensors(std::map<std::string, dgsot::SensorValues>& sensorsIn);
4444

45-
void setupSetSensors(std::map<std::string, dgsot::SensorValues> &sensorsIn);
45+
void setupSetSensors(std::map<std::string, dgsot::SensorValues>& sensorsIn);
4646

47-
void nominalSetSensors(std::map<std::string, dgsot::SensorValues> &sensorsIn);
47+
void nominalSetSensors(std::map<std::string, dgsot::SensorValues>& sensorsIn);
4848

49-
void cleanupSetSensors(std::map<std::string, dgsot::SensorValues> &sensorsIn);
49+
void cleanupSetSensors(std::map<std::string, dgsot::SensorValues>& sensorsIn);
5050

51-
void getControl(std::map<std::string, dgsot::ControlValues> &anglesOut);
51+
void getControl(std::map<std::string, dgsot::ControlValues>& anglesOut);
5252

5353
void setLeftWheelIndex(int idx);
5454

@@ -58,7 +58,7 @@ class SoTTiagoDevice : public dgsot::Device {
5858
void setTimeStep(double dt) { timestep_ = dt; }
5959

6060
protected:
61-
void setClosedLoop(const bool &closedLoop) { closedLoop_ = closedLoop; };
61+
void setClosedLoop(const bool& closedLoop) { closedLoop_ = closedLoop; };
6262

6363
/// \brief Whether the control of the base should be expressed in odometry
6464
/// frame of base frame.

src/sot-tiago-steel-controller.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ void SoTTiagoSteelController::startupPython() {
6363
}
6464

6565
extern "C" {
66-
dgsot::AbstractSotExternalInterface *createSotExternalInterface() {
66+
dgsot::AbstractSotExternalInterface* createSotExternalInterface() {
6767
return new SoTTiagoSteelController();
6868
}
6969
}
7070

7171
extern "C" {
72-
void destroySotExternalInterface(dgsot::AbstractSotExternalInterface *p) {
72+
void destroySotExternalInterface(dgsot::AbstractSotExternalInterface* p) {
7373
delete p;
7474
}
7575
}

0 commit comments

Comments
 (0)