Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 1928e75

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent deeeb9d commit 1928e75

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

src/sot-pyrene-controller.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ void SoTPyreneController::startupPython() {
3636
}
3737

3838
extern "C" {
39-
dgsot::AbstractSotExternalInterface *createSotExternalInterface() {
39+
dgsot::AbstractSotExternalInterface* createSotExternalInterface() {
4040
return new SoTPyreneController;
4141
}
4242
}
4343

4444
extern "C" {
45-
void destroySotExternalInterface(dgsot::AbstractSotExternalInterface *p) {
45+
void destroySotExternalInterface(dgsot::AbstractSotExternalInterface* p) {
4646
delete p;
4747
}
4848
}

src/sot-talos-controller.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void SoTTalosController::init() {
4242

4343
// rosInit is called here only to initialize ros.
4444
// No spinner is initialized.
45-
ros::NodeHandle &nh = dynamicgraph::rosInit(false, false);
45+
ros::NodeHandle& nh = dynamicgraph::rosInit(false, false);
4646
interpreter_ = boost::shared_ptr<dynamicgraph::Interpreter>(
4747
new dynamicgraph::Interpreter(nh));
4848

@@ -59,27 +59,27 @@ SoTTalosController::~SoTTalosController() {
5959
}
6060

6161
void SoTTalosController::setupSetSensors(
62-
map<string, dgsot::SensorValues> &SensorsIn) {
62+
map<string, dgsot::SensorValues>& SensorsIn) {
6363
device_->setupSetSensors(SensorsIn);
6464
}
6565

6666
void SoTTalosController::nominalSetSensors(
67-
map<string, dgsot::SensorValues> &SensorsIn) {
67+
map<string, dgsot::SensorValues>& SensorsIn) {
6868
device_->nominalSetSensors(SensorsIn);
6969
}
7070

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

7676
void SoTTalosController::getControl(
77-
map<string, dgsot::ControlValues> &controlOut) {
77+
map<string, dgsot::ControlValues>& controlOut) {
7878
try {
7979
sotDEBUG(25) << __FILE__ << __FUNCTION__ << "(#" << __LINE__ << ")" << endl;
8080
device_->getControl(controlOut);
8181
sotDEBUG(25) << __FILE__ << __FUNCTION__ << "(#" << __LINE__ << ")" << endl;
82-
} catch (dynamicgraph::sot::ExceptionAbstract &err) {
82+
} catch (dynamicgraph::sot::ExceptionAbstract& err) {
8383
std::cout << __FILE__ << " " << __FUNCTION__ << " (" << __LINE__ << ") "
8484
<< err.getStringMessage() << endl;
8585
throw err;
@@ -92,9 +92,9 @@ void SoTTalosController::setSecondOrderIntegration(void) {
9292
device_->setSecondOrderIntegration();
9393
}
9494

95-
void SoTTalosController::runPython(std::ostream &file,
96-
const std::string &command,
97-
dynamicgraph::Interpreter &interpreter) {
95+
void SoTTalosController::runPython(std::ostream& file,
96+
const std::string& command,
97+
dynamicgraph::Interpreter& interpreter) {
9898
file << ">>> " << command << std::endl;
9999
std::string lres(""), lout(""), lerr("");
100100
interpreter.runCommand(command, lres, lout, lerr);

src/sot-talos-controller.hh

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

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

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

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

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

4444
void setNoIntegration(void);
4545
void setSecondOrderIntegration(void);
@@ -53,17 +53,17 @@ class SoTTalosController : public dgsot::AbstractSotExternalInterface {
5353
protected:
5454
// Update output port with the control computed from the
5555
// dynamic graph.
56-
void updateRobotState(std::vector<double> &anglesIn);
56+
void updateRobotState(std::vector<double>& anglesIn);
5757

5858
/// Run a python command
59-
void runPython(std::ostream &file, const std::string &command,
60-
dynamicgraph::Interpreter &interpreter);
59+
void runPython(std::ostream& file, const std::string& command,
60+
dynamicgraph::Interpreter& interpreter);
6161

6262
virtual void startupPython();
6363

6464
void init();
6565

66-
SoTTalosDevice *device_;
66+
SoTTalosDevice* device_;
6767
};
6868

6969
#endif /* _SOT_TalosController_H_ */

src/sot-talos-device.hh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ class SoTTalosDevice : 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
SoTTalosDevice(std::string RobotName);
4141
virtual ~SoTTalosDevice();
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 timeStep(double ts) { timestep_ = ts; }
5454

@@ -76,17 +76,17 @@ class SoTTalosDevice : public dgsot::Device {
7676
dynamicgraph::Signal<dg::Vector, int> d_gainsSOUT_;
7777

7878
/// Protected methods for internal variables filling
79-
void setSensorsForce(std::map<std::string, dgsot::SensorValues> &SensorsIn,
79+
void setSensorsForce(std::map<std::string, dgsot::SensorValues>& SensorsIn,
8080
int t);
81-
void setSensorsIMU(std::map<std::string, dgsot::SensorValues> &SensorsIn,
81+
void setSensorsIMU(std::map<std::string, dgsot::SensorValues>& SensorsIn,
8282
int t);
83-
void setSensorsEncoders(std::map<std::string, dgsot::SensorValues> &SensorsIn,
83+
void setSensorsEncoders(std::map<std::string, dgsot::SensorValues>& SensorsIn,
8484
int t);
8585
void setSensorsVelocities(
86-
std::map<std::string, dgsot::SensorValues> &SensorsIn, int t);
86+
std::map<std::string, dgsot::SensorValues>& SensorsIn, int t);
8787
void setSensorsTorquesCurrents(
88-
std::map<std::string, dgsot::SensorValues> &SensorsIn, int t);
89-
void setSensorsGains(std::map<std::string, dgsot::SensorValues> &SensorsIn,
88+
std::map<std::string, dgsot::SensorValues>& SensorsIn, int t);
89+
void setSensorsGains(std::map<std::string, dgsot::SensorValues>& SensorsIn,
9090
int t);
9191

9292
/// Intermediate variables to avoid allocation during control

0 commit comments

Comments
 (0)