FlytSim DemoApps not running and HIL


#1

Hi everyone,

I installed FlytSim on Ubuntu 16.04 successfully.
On my PC when I launched FlytSim using this command
sudo $(rospack find core_api)/scripts/start_flytOS.sh --sitl
Gazebo started successfully with the drone in the middle.
Then I run the following command to start DemoApp1
/flyt/flytapps/onboard/install/demoapp1
hitting ENTER, nothing happened and it just finish immediately. I don’t know why?

I also has another two questions regarding

  • How to use FlytSim on the PC to simulate an onboard APP that runs on ODroid XU4 connected to Pixhawk? I’d like to do HIL (I guess)
  • How to change the environment in which the drone appears? In the demo video on the Wiki the environment was a gas station but when I run Gazebo it just give blank grey environment.

I think nothing in the Wiki explain these important points.

Thanks


#2

Can you try creating your own demoapp and check whether its working or not.

Instead of linking an onboard app running on ODROID to FlytSIM, can you rather write your onboard app on you own local machine and test it out? I dont find a specific use-case where you would want to run your app on odroid and link it to FlytSIM. If you need this particular feature, kindly explain your use-case in a bit more detail.

Can you revert with content of your file: /flyt/flytos/flytcore/share/sitl_gazebo/launch/posix_sitl.launch
specifically the value for argument: ‘world’


#3

@srv Thanks for your reply and sorry for my late reply

  • I tried to run AppDemo2 and it worked fine. I don’t know what could be the problem with Demo1?

  • I would like to do Hardware in The Loop simulation. running my onboard App on ODroid which controls Pixhawk but I don’t have access to a real copter, therefore I’d like to simulate the output of Pixhawk controlling the rotors. I don’t know if you support such a simulation?

  • This is the content of the file you asked for:

      <arg name="headless" default="false"/>
      <arg name="gui" default="true"/>
      <arg name="ns" default="/"/>
      <arg name="world" default="iris"/>
      <!-- <arg name="world" default="city_cloud_without_iris"/> -->
      <arg name="global_namespace" default="flytsim"/>
      
      <group ns="$(arg global_namespace)">
          <node pkg="sitl_gazebo" type="sitl_run.sh" name="simulator" args="rcS none gazebo iris $(find sitl_gazebo) " >
              <env name="no_sim" value="1" />
          </node>
          <include file="$(find gazebo_ros)/launch/empty_world.launch">
              <arg name="headless" value="$(arg headless)"/>
              <arg name="gui" value="$(arg gui)"/>
              <arg name="world_name" value="$(find sitl_gazebo)/worlds/$(arg world).world" />
          </include>
      </group>
    

Thanks


#4

Hi @SalahuddinAsh,

Thanks to you, I found a bug in demoapp1, and it has been resolved. Demoapp1 would be working from next update.

No, FlytSIM is a Software In The Loop(SITL) type. It simulates Pixhawk hardware running controllers and estimators as well as the rotors in a 3D Gazebo based environment. May I know why do you specifically need HIL and SITL cannot solve your issues. You can always run the ODROID applications on your own laptop and test them out with FlytSIM.

To get more objects, you can update value of world to “city”.


#5

Thanks @srv, I’ve successfully changed “iris” to “city” and the environment changed to the same as in the demo video.

I don’t need HiL for some specific reason except for, I think it would be more accurate and reliable than SiL.

Thanks


#6

Well I am sorry but I don’t have much data on that to comment. But I guess you are right, HIL would be more accurate but it would be a tedious and time-taking job as well. Also considering the fact that FlytSIM is used to test your apps, which are not flight critical(estimator or controllers) being somewhat less accurate still does the job. Ofcourse it depends on your use-case, though.