What does multi_step in world_control.proto do?
I am trying to execute several steps of Gazebo7 simulation by sending a msgs::WorldControl
message to Gazebo where simulation is paused. In effect, I aim to advance the simulation by a varying amount of time. However, regardless of what number I pass using msg.set_multi_step(m_stepCount)
, I cannot seem to advance by more than 1 iteration.
Did I misunderstand what multi_step does?
Relevant code excerpt from one of my experiments:
void OnUpdate()
{
// Throttle Publication
gazebo::common::Time::MSleep(1000);
m_step_count = m_step_count == 1 ? 700 : 1;
msgs::WorldControl msg;
msg.set_multi_step(m_step_count);
this->pub->Publish(msg);
// msgs::WorldControl stepMsg;
// stepMsg.set_step(1);
// this->pub->Publish(stepMsg);
std::cout << "Publishing OnUpdate. Steps: " << m_step_count << std::endl;
}
The result is that every second:
- Iteration increases by 1
- Sim Time increases by 00 00:00:00.001
- Real Time is increased by 00 00:00:01.000
- 700 or 1 are printed in the output string, alternating on every tick
The issue has been solved, but I will keep this question open for answers regarding the effects of setting the multi_step field.