Open Jaeyoung-Lim opened 3 years ago
@Jaeyoung-Lim . Hi I am interested in running HITL with JSBSim bridge, Can you please guide me with the steps to follow for this. any help will be highly appreciated.
@fahadmaqbool16 The pull request already explains how to test this PR, what additional information do you need?
@Jaeyoung-Lim thanks for your reply, when I run
HEADLESS=1 ./jsbsim_bridge rascal -d /dev/ttyACM0 -s ~/src/Firmware/Tools/jsbsim_bridge/scene/LSZH.xml
in Tools directory I get
bash: ./Tools/jsbsim_bridge/: Is a directory
Nothing happens.
@fahadmaqbool16 If you read the PR description, your command does not match what I have described
Also your log says that what you tried to execute is a directory, therefore it is expected that nothing happens
No, actually I was changing the directory to Tools to see if the command works, but it didn't. To clarify, I am
running this command HEADLESS=1 ./jsbsim_bridge rascal -d /dev/ttyACM0 -s ~/src/Firmware/Tools/jsbsim_bridge/scene/LSZH.xml
in the Tools directory, I get the error
ofp@ubuntu:~/PX4-Autopilot/Tools$ HEADLESS=1 ./jsbsim_bridge rascal -d /dev/ttyACM0 -s ~/src/Firmware/Tools/jsbsim_bridge/scene/LSZH.xml
bash: ./jsbsim_bridge: Is a directory
if this command is not correct, can you please tell the correct command,
Hi, My bad, I was running the command in the Tools directory, now I am able to make the jsbsim bridge work by running that command (HEADLESS=1 ./jsbsim_bridge rascal -d /dev/ttyACM0 -s ~/src/Firmware/Tools/jsbsim_bridge/scene/LSZH.xml) from within the build directory (/PX4-Autopilot/build/px4_sitl_default/build_jsbsim_bridge). My pixhawk is detected on the serial port as shown in the image below.
QGC is also able to connect with pixhawk but i am unable to arm the vehicle as the vehicle launch position is not showing in QGC.
running dmesg in the MAVLINK console shows the follwing output.
PS: I replaced the px4_jsbsim_bridge files from this repo. (https://github.com/Auterion/px4-jsbsim-bridge/tree/f88764b091a8f5bc5f98893f07c63b56682a1420)
PS: I replaced the px4_jsbsim_bridge files from this repo. (https://github.com/Auterion/px4-jsbsim-bridge/tree/f88764b091a8f5bc5f98893f07c63b56682a1420)
@fahadmaqbool16 You can't do that it only works with this specific branch
Describe problem solved by this pull request Currently the
px4-jsbsim-bridge
can only be used to run Software-In-The-Loop(SITL) simulations. While this is useful for evaluating the software changes in firmware, it may not reveal issues that may appear only deployed on hardware. PX4 also supports Hardware-In-The-Loop(HITL) simulation. However, this was not exposed to the jsbsim-bridgeDescribe your solution This commit adds configuration options for running HITL simulation with the PX4 JSBSim bridge.
The device path / baudrate can be passed with the command line when running the binary directly with flag
-d
and-b
. e.g.or to set the baudrate
The bridge is configured to be run with a HITL when the device path
-d
is provided. The baudrate is configured to be921600
by default, but can be also configured through a-b
flag.Test data / coverage [WIP]()
Additional context