Skip to content

Commit

Permalink
fixed merge
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe committed Sep 4, 2024
1 parent 9a584bc commit c46e386
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions rtabmap_odom/include/rtabmap_odom/OdometryROS.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,12 @@ class OdometryROS : public rclcpp::Node, public UThread
rclcpp::Subscription<sensor_msgs::msg::Imu>::SharedPtr imuSub_;
rclcpp::CallbackGroup::SharedPtr imuCallbackGroup_;

UMutex dataMutex_;
UMutex imuMutex_;
USemaphore dataReady_;

rtabmap::SensorData dataToProcess_;
std_msgs::msg::Header dataHeaderToProcess_;

// Safe-threading
UMutex imuMutex_;
UMutex dataMutex_;
USemaphore dataReady_;
rtabmap::SensorData dataToProcess_;
std_msgs::Header dataHeaderToProcess_;
std_msgs::msg::Header dataHeaderToProcess_;

bool paused_;
int resetCountdown_;
Expand Down
2 changes: 1 addition & 1 deletion rtabmap_odom/src/OdometryROS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ void OdometryROS::reset(const Transform & pose)
resetCurrentCount_ = resetCountdown_;
imuProcessed_ = false;
dataToProcess_ = SensorData();
dataHeaderToProcess_ = std_msgs::Header();
dataHeaderToProcess_ = std_msgs::msg::Header();
imuMutex_.lock();
imus_.clear();
imuMutex_.unlock();
Expand Down

0 comments on commit c46e386

Please sign in to comment.