ROS & Gazebo moving object following a trajectory
Hello all, I pretty new to gazebo and ROS environment so I would like a little help on where to start with a project I am working on.
So, what I want to do is create a simulation for an object which could be anything from just a box or a quadrotor but only in the shape not in the properties. This object is governed by some kinematics which actually are a double integrator for acceleration in x and y directions. I have the state space system and I am currently implementing an optimal feedback control (MPC) in order for the object to follow a given trajectory.
What I would like to do is to simulate this scenario for an abstract object (I want to do upper level control) in Gazebo and ROS environment but I do not know from where to start. A thought would be to have a model like the standing person model or the quadrotor model with a mass of 1 and find each time step to apply the force needed (F=m*a) in x and y in order for the object to follow the trajectory given. I do not know however neither how this could be done nor from where to start. So if you have any suggestions or tutorials that could help me with it, this would be very helpful.
Thank you a lot in advance!
Do you want Gazebo's physics engine to apply forces to your object (gravity, contacts...), or are you calculating that yourself and just want to send precise trajectories which the object should hold inside the simulation?
I'm mostly interested in the second part. I have the trajectory and I want the object to hold this trajectory inside the simulation
Will setting the position of my object through service gazebo/setModelState in a node work?
It should work, be sure to make the model static