MCPcopy Create free account
hub / github.com/ISEE-Technology/CamVox / ProcessLoop

Function ProcessLoop

isee-preprocessing/src/data_process_node.cpp:114–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void ProcessLoop(std::shared_ptr<ImuProcess> p_imu) {
115 ROS_INFO("Start ProcessLoop");
116
117 ros::Rate r(1000);
118 while (ros::ok()) {
119 MeasureGroup meas;
120 std::unique_lock<std::mutex> lk(mtx_buffer);
121 sig_buffer.wait(lk,
122 [&meas]() -> bool { return SyncMeasure(meas) || b_exit; });
123 lk.unlock();
124
125 if (b_exit) {
126 ROS_INFO("b_exit=true, exit");
127 break;
128 }
129
130 if (b_reset) {
131 ROS_WARN("reset when rosbag play back");
132 p_imu->Reset();
133 b_reset = false;
134 continue;
135 }
136 p_imu->Process(meas);
137
138 r.sleep();
139 }
140}
141
142int main(int argc, char **argv) {
143 ros::init(argc, argv, "data_process");

Callers

nothing calls this directly

Calls 4

SyncMeasureFunction · 0.85
unlockMethod · 0.80
ProcessMethod · 0.80
ResetMethod · 0.45

Tested by

no test coverage detected