-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plane can't runaway take off in HITL mode #60
Comments
@huyandenghuangbo HIL support was added in #28 could you try this PR? |
@Jaeyoung-Lim Sorry, I'll try it right away |
@Jaeyoung-Lim I tried, but it can't work, the code above used comes from the pr-hil-support branch, I checked the code with #28, they are same ,but it has the same result after running. PS: I changed the code that can receive the right gps data(interface->SetHILStateLevel(true)---->interface->SetHILStateLevel(false);), as follows: |
@huyandenghuangbo Did changing the code have any effect on the results? |
@Jaeyoung-Lim it can't takeoff as usual |
@Jaeyoung-Lim I read the log file, it shows the px4's ouput actuator data has no problem |
hey, even I'm facing similar issues here, did you guys have any luck figuring this out ? Does it have something to do with the mixer and control files ? I'm guessing the outputs of PX4 are mismatched with the outputs of the simulator so maybe the throttle doesn't really go to the motor but some other servo, so the plane does not move ? I was looking through this file In SITL the setup works well, QGC shows some custom airframe when launching SITL, so maybe a similar config in HILStar plane might start the plane and map proper control surfaces , any Ideas ? |
@ParamDeshpande Did you manage to solve this issue? I am trying to run jsbsim hitl with rascal and facing similar issue. The vehicle is unable to takeoff and instead just crashes right away. The connection from the jsbsim bridge is then closed with following error: |
@tayyabkhalil-313 No I haven't solved the issue yet, but did you arm the plane before takeoff ? |
@ParamDeshpande Yes i am able to arm the vehicle. |
@tayyabkhalil-313 check if the plane isn't getting spawned mid-air ? Try changing locations in the
The plane seems to be stable for me on VTBS airport. However the throttle values are still 100% and the plane doesn't seem to move. I tried debugging the JSBSim bridge code, by printing actuator values, in the file
For SITL things are working fine the throttle values from PX4 are passed to rascal and JSBSim, ie PX4 does send nonzero throttle values to the simulator and the plane takeoffs. However for HITL setup the PX4 hardware (CubeOrange) sends zero actuator values when I arm the vehicle. And a -1.2xScale value when it is ready to fly. This likely means some changes for the configuration files need to be done on the PX4 firmware side for the HILStar plane ? @Jaeyoung-Lim Do you have any ideas how to do it ? Did you manage to takeoff with the PR ? |
@ParamDeshpande For me, the vehicle does move but still crashes after changing the location. |
@tayyabkhalil-313 Can you tell which pixhawk model are you using and the firmware version. Also if you're trying to takeoff via radio or joystick ? |
|
@ParamDeshpande Are you able to run JSBSim SITL for Rascal successfully? The model crashes for me in SITL as well during takeoff. |
@tayyabkhalil-313 yeah SITL is working well for me. I think I've also managed to solve the takeoff issue in HITL too( partially atleast). I changed the config file for the Created a new config file
The MAVLINK channels are mismatched from PX4 for Roll, pitch, yaw and throttle to the I changed the config file path in
With this atleast all my actuators are responsive from PX4 to Simulator and back in HITL mode. Takeoff still crashed with mission mode on. |
Why is that required? I think this is not used in the HITL implementation of the bridge. Instead the name of the config file can be specified while running the bridge.
Did you make any changes to the rascal model or were you able to run it directly? Can you please specify the JSBSim version you are using? |
I'm using ROS to launch the HITL setup, but yeah this also should work.
No I did not make any changes for SITL for Rascal model. |
Do you have any idea why the SITL for rascal wouldn't work with JSBSim? |
Atleast for SITL I am able to takeoff using Mission Mode. For HITL still the plane does a barrel roll and goes inside the ground. I've recompiled the PX4 with these changes and uploaded them on Cubeorange, it fails. Can anyone check if this method works for HITL SITL Fix : Find the files ie set
|
Hello, I really need your help. I tried to run your modified code, but an error message will be reported as follows: Opened serial device/dev/ttyACM0 In file/home/lh/Code/autopilot HITL/Tools/jsbsim_ Bridge/models/Rapid/Rapid 110 JSBSim.xml: line 104 Engine location ignored, only thrust location is used In file/home/lh/Code/autopilot HITL/Tools/jsbsim_ Bridge/models/Rapid/Rapid 110 JSBSim.xml: line 109 Engine orientation ignored, only thrust orientation is used Send: Connection reused Send: Connection reused Send: Connection reused Send: Connection reused If you take the time out of your busy schedule to help me take a look, I would greatly appreciate it. |
I used the pr-hitl-support branch code, I show the detail:
the command as follows:
then the px4 connect the qgc via udp, I inserted those code to read the accel and gyro in the file of sensor_imu_plugin.cpp in realtime. Like this:
I load a fly plan into px4 and run the mission mode, but it can't runaway takeoff. And the accel and gyro data flow Like this:
I don't konw where the problem is.
The text was updated successfully, but these errors were encountered: