P3TE / Autonomous-Surface-Vehicle-Simulator

A simulator designed for the 2016 Maritime RobotX Challenge
GNU General Public License v3.0
6 stars 4 forks source link

Is there any more detailed guidance? #4

Open PhoenixTreeember opened 5 years ago

PhoenixTreeember commented 5 years ago

I have compiled the source code, how do I use this simulator? How to operate the simulation ship? Is there any more detailed guidance?

P3TE commented 5 years ago

When I used this simulator for the 2016 RobotX competition, I coupled it with ROS and used ROS messaging to control the motor forces on the boat. Unfortunately that wasn't the easiest thing to setup. First of all you need RosJava. Secondly, you need to have the simulator compile with RosJava. I never found a way to setup the linux natives with RosJava properly... so what I did instead was build the entire simulator as a .jar and imported that into the RosJava project. Once I had the .jar, I built a wrapper that would output image, lidar, gps and imu messages to ROS and took motor commands which were converted to forces to move the boat. This wrapper code is owned by QUT RobotX team, so I would have to ask permission if I were to upload it to a public github repository, let me know if you're interested and I can ask.

That being said, you don't have to use ROS, or even my wrapper, that was just the setup the QUT RobotX team was working with. In any case to interface with another system, you will have to write your own wrapper to pass data back and forth to the simulator.

PhoenixTreeember commented 5 years ago

I looked at the official simulator effect on robotx.org and I am still very interested in this project. If there is a sample for learning how to use this simulation software with ros, I think it is very useful for building my own simulation project in the future.

P3TE commented 5 years ago

If you're interested in building your own simulation project, An option that you might be interested in using is the Unreal Engine. You write in c++ with Unreal Engine, which is a compatible ROS language which should make integration easier. I've made simulators in Java and C#, a lot of time is wasted writing a wrapper for ROS that will send and receive messages to the simulator. Another consideration is that if you use the official simulator from RobotX.org, than you will be able to enter into their virtual competition. Finally, to directly answer your question, there aren't really any learning resources on how to integrate this with ROS. It's just been an in house RobotX project. However I will ask if I can release the code that I used to integrate this simulator with ROS.

PhoenixTreeember commented 5 years ago

Looking forward to your sharing