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

Commit f06182f

Browse files
authored
Merge pull request #118 from stack-of-tasks/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 6b17a81 + a6f38f0 commit f06182f

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ci:
22
autoupdate_branch: 'devel'
33
repos:
44
- repo: https://github.com/pre-commit/mirrors-clang-format
5-
rev: v20.1.8
5+
rev: v21.1.2
66
hooks:
77
- id: clang-format
88
args: [--style=Google]
@@ -24,8 +24,8 @@ repos:
2424
- id: fix-byte-order-marker
2525
- id: mixed-line-ending
2626
- id: trailing-whitespace
27-
- repo: https://github.com/psf/black
28-
rev: 25.1.0
27+
- repo: https://github.com/psf/black-pre-commit-mirror
28+
rev: 25.9.0
2929
hooks:
3030
- id: black
3131
- repo: https://github.com/PyCQA/flake8

include/dynamic_graph_bridge/sot_loader.hh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@ class SotLoader : public SotLoaderBasic {
8484
~SotLoader();
8585

8686
// \brief Create a thread for ROS and start the control loop.
87-
void initializeRosNode(int argc, char *argv[]);
87+
void initializeRosNode(int argc, char* argv[]);
8888

8989
// \brief Compute one iteration of control.
9090
// Basically calls fillSensors, the SoT and the readControl.
91-
void oneIteration(const double &period = 0);
91+
void oneIteration(const double& period = 0);
9292

9393
// \brief Fill the sensors value for the SoT.
94-
void fillSensors(std::map<std::string, dgs::SensorValues> &sensorsIn);
94+
void fillSensors(std::map<std::string, dgs::SensorValues>& sensorsIn);
9595

9696
// \brief Read the control computed by the SoT framework.
97-
void readControl(std::map<std::string, dgs::ControlValues> &controlValues);
97+
void readControl(std::map<std::string, dgs::ControlValues>& controlValues);
9898

9999
// \brief Prepare the SoT framework.
100100
void setup();

src/geometric_simu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include <dynamic_graph_bridge/sot_loader.hh>
1616

17-
int main(int argc, char *argv[]) {
17+
int main(int argc, char* argv[]) {
1818
::dynamicgraph::RealTimeLogger::instance().addOutputStream(
1919
::dynamicgraph::LoggerStreamPtr_t(
2020
new dynamicgraph::LoggerIOStream(std::cout)));

src/sot_loader.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct DataToLog {
4242
if (idx == N) idx = 0;
4343
}
4444

45-
void save(const char *prefix) {
45+
void save(const char* prefix) {
4646
std::ostringstream oss;
4747
oss << prefix << "-times.log";
4848

@@ -57,7 +57,7 @@ struct DataToLog {
5757
}
5858
};
5959

60-
void workThreadLoader(SotLoader *aSotLoader) {
60+
void workThreadLoader(SotLoader* aSotLoader) {
6161
ros::Rate rate(1000); // 1 kHz
6262
double periodd(1e-3);
6363

@@ -123,7 +123,7 @@ void SotLoader::startControlLoop() {
123123
thread_ = boost::thread(workThreadLoader, this);
124124
}
125125

126-
void SotLoader::initializeRosNode(int argc, char *argv[]) {
126+
void SotLoader::initializeRosNode(int argc, char* argv[]) {
127127
SotLoaderBasic::initializeRosNode(argc, argv);
128128
// Temporary fix. TODO: where should nbOfJoints_ be initialized from?
129129
if (ros::param::has("/sot/state_vector_map")) {
@@ -134,7 +134,7 @@ void SotLoader::initializeRosNode(int argc, char *argv[]) {
134134
startControlLoop();
135135
}
136136

137-
void SotLoader::fillSensors(map<string, dgs::SensorValues> &sensorsIn) {
137+
void SotLoader::fillSensors(map<string, dgs::SensorValues>& sensorsIn) {
138138
// Update joint values.w
139139
assert(angleControl_.size() == angleEncoder_.size());
140140

@@ -144,7 +144,7 @@ void SotLoader::fillSensors(map<string, dgs::SensorValues> &sensorsIn) {
144144
sensorsIn["joints"].setValues(angleEncoder_);
145145
}
146146

147-
void SotLoader::readControl(map<string, dgs::ControlValues> &controlValues) {
147+
void SotLoader::readControl(map<string, dgs::ControlValues>& controlValues) {
148148
// Update joint values.
149149
angleControl_ = controlValues["control"].getValues();
150150

@@ -205,12 +205,12 @@ void SotLoader::setup() {
205205
readControl(controlValues_);
206206
}
207207

208-
void SotLoader::oneIteration(const double &period) {
208+
void SotLoader::oneIteration(const double& period) {
209209
fillSensors(sensorsIn_);
210210
try {
211211
sotController_->nominalSetSensors(sensorsIn_);
212212
sotController_->getControl(controlValues_, period);
213-
} catch (std::exception &) {
213+
} catch (std::exception&) {
214214
throw;
215215
}
216216

0 commit comments

Comments
 (0)