Gazebo | Ignition | Community
Ask Your Question

LinasKo's profile - activity

2018-10-23 08:28:45 -0500 received badge  Famous Question (source)
2018-08-24 02:59:26 -0500 received badge  Notable Question (source)
2018-08-21 08:57:25 -0500 marked best answer 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
2018-08-21 08:57:25 -0500 received badge  Scholar (source)
2018-08-21 08:57:10 -0500 received badge  Popular Question (source)
2018-08-15 03:52:27 -0500 commented question What does multi_step in world_control.proto do?

The issue has been solved, but I will keep this question open for answers regarding the effects of setting the multi_ste

2018-08-15 03:52:22 -0500 commented question What does multi_step in world_control.proto do?

The issue has been solved, but I will keep this question open for answers regarding the effects of setting the multi_ste

2018-08-15 03:50:21 -0500 commented answer What does multi_step in world_control.proto do?

Ultimately, with your help, I think figured it out. I have removed MSleep and will block the OnUpdate until a volatile b

2018-08-15 03:44:08 -0500 commented answer What does multi_step in world_control.proto do?

Is there a specific reason to not block the physics thread, as it seems to be exactly what I want to do. Basically, for

2018-08-14 11:59:00 -0500 asked a question What does multi_step in world_control.proto do?

What does multi_step in world_control.proto do? I am trying to execute several steps of Gazebo7 simulation by sending a