Replies

    • Hi - I have the same problem.  SITL runs on the Ubuntu  virtual  machine giving me a map,

      a console, and a couple of terminals with various data.  However, I am not able to connect the the Mission Planner.

      I have followed Randy's instructions to append my iPaddress towards the end of the sim_arducopter_randy.sh file.

      I have an additional question:  I would like to simulate my own flight modes by compiling my own code;

      how can the new code be simulated with SITL ?

      Thanks.

      Robert

      • From the VM machine can you ping the IP address that you are sending the packets to?

        It may be a problem with the networking of the VM.  I usually run mine in bridged mode rather than NAT.  In bridged mode the VM gets an IP address as if it was another complete PC on your network so it will get another address from your router or whatever gives you IP addresses.  Below is my SITL VM and the command line I use.  Also in the settings of the network card for the VM I change it to bridged mode.

        3702663724?profile=original

        3702663802?profile=original

        • Hi Stephen,

          Thank you for your suggestions.  I did not use the bridged network option

          because I could not view clearly your attached images. However,  I was able to make a connection to

          the Mission Planner using the NAT network option.  What I was doing wrong before was to use

          an incorrect IPaddress.  When I chose the ipaddress given under  "Ethernet Adapter VMware Network Adapter VMnet1", connection to the Mission Planner via UDP was successful.

          The xxx.xxx.xx.x part in the file "sim_arducopter_randy.sh"

          has to be changed to the new ipaddress:

          mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551 --out xxx.xxx.xx.x:14550 --console --map --aircraft test --quadcopter $*

          I obtained the correct ipaddress by using the command "ipconfig" in the win7 command terminal.

          Robert

  • I seem to have the SITL working. APM Planner connects fine. My issue is that I seem to have no control through Planner? The vehicle is simulating all over the place... climbing, banking, etc etc but it seems to be doing it on it's own. It seems I can only use APM Planner to watch what is going on and have no  control over what the model does, or what the simulated environment looks like.

    Can someone point me to where I can get a better handle on how to manage the vehicle and the simulation "environment" now that the code is actually up and running?

    Thanks in advance

    • Developer

      John,

           So the issue is likely the script that you're running to fire up the simulator.  So you're likely starting one of the pre-canned tests by running this:

      ./Tools/autotest/autotest.py build.ArduCopter fly.ArduCopter logs.ArduCopter --map --viewerip=192.168.184.1

           Instead you could try running sim_vehicle.sh or sim_arducopter_randy.sh.  Sorry, I can't immediately remember all the parameters that would need to be added.

      • Funny, I was just coming on here to update this based on some more work...

        #1 I think I had an issue with the default eprom. When I ran the sim_vehicle -w the last time, the system was not quite working yet (had not done a make on the ardupilot code yet). Once I re-did the "-w" it fixed alot of the crazy flight pattern I was seeing and the APM Planner was sitting waiting for me to tell it what to do.

        So, you were right on :)

        Now, my question is how to manage the environment. How do I set the "home" or "starting" location? I am guessing there is a way to give the GPS simulator an initial location?

        Also, how do you manage weather - particularly wind speed and direction.

        I appreciate the help!!

        • Developer

          John,

               the wind doesn't work in the simulator for copter unfortunately.  It only works for plane.  I'm not sure why, sorry!

               if you use the sim_vehicle.sh script then there is a "-L" option that allows you to set the home location from any location in the Location.txt file.

          • i'm using the plane version primarily. Is there a good write-up of all the functions of the sim_vehilce.sh script?

            HELP doesn't show much =\

            =================

            edited... got into the .sh script and it has a little documentation. I think I am on the right track...

            • Developer

              John,

                   No write-up as far as I know. sorry!

              • Hi Randy,

                 I just started SITL for Windows using ArduPilot. I am at the Step 7 of setting up SITL using Linux. I keep getting an error " wp:command not found" whenever i use "wp load ../Tools/autotest/ArduPlane-Missions/CMAC-toff-loop.txt". I have already checked for the paths in .bashrc and changed them accordingly as some of the mavproxy stuff didn't get installed in the Home directory. I also ran the line endings fixes by doing the dos2unix.

                So, this is the only place I am getting stuck at and don't understand why it can't find the command.

This reply was deleted.

Activity

David Hori liked Isabella Domi's profile
Jan 12
More…