fengzhongsu
fengzhongsu
> How do you create timer to publish messages ? create_wall_timer or create_timer Simulate time doesn't affect create_wall_timer. Hi, Barry. In simulation, i used rclcpp::Rate loop_rate(ctrl_freq); And In a `while(rclcpp::ok())...
> Please note that rclcpp::Rate use `RCL_SYSTEM_TIME` in default. Do you change it ? > > https://github.com/ros2/rclcpp/blob/348e22a48641bf2622f81e562ad3cb7bf910a183/rclcpp/include/rclcpp/rate.hpp#L133-L146 I have been set use_sim_time=true https://design.ros2.org/articles/clock_and_time.html
> As fujitatomoya said,you should modify code on creating Rate. > > rclcpp::Rate loop_rate(ctrl_freq, std::make_shared(RCL_ROS_TIME)); I have tried add this code. But have some error in IDE, my ros2 version...