- Home /
Is it possible to simulate robot movement and sensor feedback accurately using Unity?
Specifics: I wish to simulate the movement of an Autonomous Underwater Vehicle. The vehicle moves with the help of five thrusters attached at various point of the vehicle. The vehicle also has an IMU and two cameras attached. The vehicle will be controlled using control algorithms run on ROS with communication between ROS and the Unity simulator taking place through TCP/IP. The simulator needs to accurately:
Simulate the underwater movement of the vehicle based on thruster rotation.
Simulate IMU and camera data.
Can the above be achieved? If yes, any useful links/tutorials to help me get started would be highly appreciated.
Thanks.
Define "accurately". What's your margin of error.
Do you need near-perfect simulation? Then no. Unity is a game engine, not a physics simulation suite. The physics in unity are "good enough" to simulate toy physics for like a billiard game or falling do$$anonymous$$oes, but if you want something used at an engineering level, you'd have to look for specialized CAD software, or just calculate the motion yourself.
Hey. Thanks for your comment. As I am in a bit of a rush to complete this part of the project, I'll say near-perfect simulation isn't necessary. The vehicle has 6 thrusters attached various points. I plan to simulate the activity of the thrusters by using AddForceAtPosition at each of these points. Buoyancy force is the other thing that needs to be simulated. The vehicle will always be wholly under water. What kid of errors, if any, can I expect to see if I implement the above arrangement? Any advice from your side will help me decide whether to continue with Unity or quickly switch to another software. Thanks again.
Did you ever figure out how to simulate ROS in Unity? Will unity work for simulations?
Your answer
![](https://koobas.hobune.stream/wayback/20220612085905im_/https://answers.unity.com/themes/thub/images/avi.jpg)