ros-controls / gz_ros2_control

Connect the latest version of Gazebo with ros2_control.
https://gazebosim.org
Apache License 2.0
120 stars 89 forks source link

Tests fail on rolling #439

Open christophfroehlich opened 2 weeks ago

christophfroehlich commented 2 weeks ago

Tests fail on rolling (main/testing) for a couple of days now

2024-11-09T02:37:17.1467784Z     [gazebo-1] terminate called after throwing an instance of 'std::runtime_error'
2024-11-09T02:37:17.1469021Z     [gazebo-1]   what():  cannot store a negative time point in rclcpp::Time
2024-11-09T02:37:17.1470076Z     [gazebo-1] Stack trace (most recent call last) in thread 45420:
2024-11-09T02:37:17.1471156Z     [gazebo-1] #15   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
2024-11-09T02:37:17.1472371Z     [gazebo-1] #14   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f8044db0a33, in __clone
2024-11-09T02:37:17.1473618Z     [gazebo-1] #13   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f8044d23a93, in 
2024-11-09T02:37:17.1474842Z     [gazebo-1] #12   Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7f8040242db3, in 
2024-11-09T02:37:17.1476265Z     [gazebo-1] #11   Object "/opt/ros/rolling/opt/gz_sim_vendor/lib/libgz-sim9.so.9", at 0x7f803f60a86d, in 
2024-11-09T02:37:17.1479539Z     [gazebo-1] #10   Object "/home/runner/work/ros2_control_ci/ros2_control_ci/.work/target_ws/install/gz_ros2_control/lib/libgz_ros2_control-system.so", at 0x7f800bd71687, in gz_ros2_control::GazeboSimROS2ControlPlugin::PostUpdate(gz::sim::v9::UpdateInfo const&, gz::sim::v9::EntityComponentManager const&)
2024-11-09T02:37:17.1483839Z     [gazebo-1] #9    Object "/home/runner/work/ros2_control_ci/ros2_control_ci/.work/target_ws/install/controller_manager/lib/libcontroller_manager.so", at 0x7f800b8198c3, in controller_manager::ControllerManager::update(rclcpp::Time const&, rclcpp::Duration const&)

https://github.com/ros-controls/ros2_control_ci/actions/runs/11752396773

ahcorde commented 3 days ago

I was investigating this,

The call which is throwing this exception is this->dataPtr->controller_manager_->update(sim_time_ros, sim_period);.

I check the details of the method in the controller manager class, and this call is always returning 0. The clock is wrong for some reason.

      const rclcpp::Time current_time = get_clock()->now();

Any thoughts?