Closed Moseskota closed 1 year ago
@Moseskota
Upshot it looks to me that HITL is actually working fine, at least for Jmavsim. However you may have some MAVSDK issues.
This is the area for posting documentation bugs and I don't think this is one - certainly not with HITL or PX4. Can you please post on discuss or discord channel for MAVSDK? http://docs.px4.io/main/en/contribute/support.html#forums-and-chat
I'm closing as invalid as a docs issue here.
Hello everyone,
I am setting up HITL simulation with jmavsim and Gazebo on Ubuntu 20.04, PX4_FMU_V6x by following the steps in https://docs.px4.io/main/en/simulation/hitl.html . Everything went as mentioned but the HIL quadcopter is not taking off when trying to running a mission from QGC or from MAVSDK-Python (examples).
Steps to reproduce:
@julianoes Can you please help? Is there anything that needs to be done specifically while working with PX4_FMU_V6x or in general.
jmavsim console:
Buildfile: /home/moses/PX4-Autopilot/Tools/simulation/jmavsim/jMAVSim/build.xml
make_dirs:
compile:
create_run_jar:
copy_res:
BUILD SUCCESSFUL Total time: 0 seconds Options parsed, starting Sim. Starting GUI... WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by javax.media.j3d.JoglPipeline (rsrc:j3dcore.jar) to method sun.awt.AppContext.getAppContext() WARNING: Please consider reporting this to the maintainers of javax.media.j3d.JoglPipeline WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release Init MAVLink MSG: Landing detected
MSG: Data link regained MSG: Manual control regained after 320.7s
MSG: Manual control lost
MSG: Manual control regained after 1.4s MSG: Failsafe mode deactivated
MSG: Takeoff detected
MSG: Takeoff to 25.0 meters above home
MSG: Using minimum takeoff altitude: 2.50 m MSG: Landing at current position
MSG: Landing detected
MAVSDK-Python console:
aiting for drone to connect... -- Connected to drone! Waiting for drone to have a global position estimate... -- Global position estimate OK -- Arming -- Taking off Status: INFO: [logger] /fs/microsd/log/2022-10-17/14_05_55.ulg
Status: INFO: Using minimum takeoff altitude: 2.50 m
Status: INFO: Takeoff detected
Status: INFO: Using minimum takeoff altitude: 2.50 m
-- Landing Exception ignored in: <function WrappedIterator.del at 0x7fe72c003790> Traceback (most recent call last): File "/home/moses/anaconda3/lib/python3.8/site-packages/aiogrpc/utils.py", line 168, in del self._stream_executor.shutdown() File "/home/moses/anaconda3/lib/python3.8/concurrent/futures/thread.py", line 236, in shutdown t.join() File "/home/moses/anaconda3/lib/python3.8/threading.py", line 1008, in join raise RuntimeError("cannot join current thread")
Same results when done with Gazebo as well. Gazebo console: Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring. Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring. Opened serial device /dev/ttyACM0