Interaction ros and simulation during sensor data processing

asked 2017-05-30 06:48:32 -0500

Kaonashi gravatar image

What I want to do is the following:
I have a robot in gazebo and thanks to ros I am able to read his sensor values. Now I want to process those sensor values to generate an action, which I want to send to the simulation again. The processing of my sensor values may take some time and optimally the simulation should not go on during the processing. First I thought about stopping the simulation in gazebo, which seemed too inelegant for me. I came across ros_control which seems to perform synchronous control. So I implemented a ros_controller with a simple PID. But actually, in the end, I only want to send a command like "velocity left wheel = 1" to my robot, which has nothing to do with his control in sense of PID etc. So I am still not sure if this is the right way to go.
My question is, how is it intended to imlement the following:
Several simulation steps (information gathering) --> Stop simulation --> Process information --> Send command to simulator --> Go on with simulation --> and so on.

edit retag flag offensive close merge delete