@@ -97,13 +97,6 @@ class gz::sim::systems::LinearBatteryPluginPrivate
97
97
// / \brief Pointer to battery contained in link.
98
98
public: common::BatteryPtr battery;
99
99
100
- // / \brief Whether warning that battery has drained has been printed once.
101
- public: bool drainPrinted{false };
102
-
103
- // / \brief Battery consumer identifier.
104
- // / Current implementation limits one consumer (Model) per battery.
105
- public: int32_t consumerId;
106
-
107
100
// / \brief Battery entity
108
101
public: Entity batteryEntity{kNullEntity };
109
102
@@ -136,15 +129,11 @@ class gz::sim::systems::LinearBatteryPluginPrivate
136
129
// / \brief State of charge [0, 1].
137
130
public: double soc{1.0 };
138
131
139
- // / \brief Recharge status
140
- public: std::atomic_bool startCharging{false };
141
-
142
132
// / \brief Hours taken to fully charge battery
143
133
public: double tCharge{0.0 };
144
134
145
- // / \TODO(caguero) Remove this flag in Gazebo Dome.
146
- // / \brief Flag to enable some battery fixes.
147
- public: bool fixIssue225{false };
135
+ // / \brief Initial power load set trough config
136
+ public: double initialPowerLoad{0.0 };
148
137
149
138
// / \TODO(caguero) Remove in Gazebo Dome.
150
139
// / \brief Battery current for a historic time window
@@ -157,16 +146,6 @@ class gz::sim::systems::LinearBatteryPluginPrivate
157
146
// / \brief Simulation time handled during a single update.
158
147
public: std::chrono::steady_clock::duration stepSize;
159
148
160
- // / \brief Flag on whether the battery should start draining
161
- public: bool startDraining = false ;
162
-
163
- // / \brief The start time when battery starts draining in seconds
164
- public: int drainStartTime = -1 ;
165
-
166
- // / \brief Book keep the last time printed, so as to not pollute dbg messages
167
- // / in minutes
168
- public: int lastPrintTime = -1 ;
169
-
170
149
// / \brief Model interface
171
150
public: Model model{kNullEntity };
172
151
@@ -176,11 +155,32 @@ class gz::sim::systems::LinearBatteryPluginPrivate
176
155
// / \brief Battery state of charge message publisher
177
156
public: transport::Node::Publisher statePub;
178
157
179
- // / \brief Initial power load set trough config
180
- public: double initialPowerLoad = 0.0 ;
158
+ // / \brief Battery consumer identifier.
159
+ // / Current implementation limits one consumer (Model) per battery.
160
+ public: int32_t consumerId;
161
+
162
+ // / \brief The start time when battery starts draining in seconds
163
+ public: int drainStartTime{-1 };
164
+
165
+ // / \brief Book keep the last time printed, so as to not pollute dbg messages
166
+ // / in minutes
167
+ public: int lastPrintTime{-1 };
168
+
169
+ // / \brief Recharge status
170
+ public: std::atomic_bool startCharging{false };
171
+
172
+ // / \brief Flag on whether the battery should start draining
173
+ public: std::atomic_bool startDraining{false };
174
+
175
+ // / \brief Whether warning that battery has drained has been printed once.
176
+ public: bool drainPrinted{false };
181
177
182
178
// / \brief Flag to invert the current sign
183
179
public: bool invertCurrentSign{false };
180
+
181
+ // / \TODO(caguero) Remove this flag in Gazebo Dome.
182
+ // / \brief Flag to enable some battery fixes.
183
+ public: bool fixIssue225{false };
184
184
};
185
185
186
186
// ///////////////////////////////////////////////
0 commit comments