Skip to content

Commit

Permalink
Fix publish rate of camera images
Browse files Browse the repository at this point in the history
  • Loading branch information
lbergmann1 committed Apr 24, 2023
1 parent e21896d commit 712cd11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mujoco_ros/src/rendering/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ void offScreenRenderEnv(MujocoEnvPtr env)
env->vis_.cam.type = mjCAMERA_FIXED;
env->vis_.cam.fixedcamid = stream->cam_id_;

if (ros::Duration(1 / stream->pub_freq_) >= ros::Time::now() - stream->last_pub_) {
if (ros::Duration(1 / stream->pub_freq_) > ros::Time::now() - stream->last_pub_) {
continue;
}

Expand Down

0 comments on commit 712cd11

Please sign in to comment.