-
Notifications
You must be signed in to change notification settings - Fork 993
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
can't start HIL,need help #412
Comments
Dump here What version of mavros, px4 and ROS used? |
I use ros hydro and the latest px4, and hydro level mavros. I think jMAVSim is connecting with the Pixhawk, as it shows:
in http://pixhawk.org/dev/ros/hil it says:
so I think it may be something wrong between jMAVSim and Mavros. |
i run rostopic echo -n1 /diagnostics:
|
I think you should use that launch: https://github.com/PX4/Firmware/blob/master/launch/mavros_sitl.launch And your mavros too old. |
<arg name="fcu_url" default="udp://:14554@192.168.1.5:14555" />
<arg name="gcs_url" default="udp://:14556@192.168.1.5:14550" /> So at least you should provide this parameters to px4.launch. |
@vooon |
here is my launch file: <launch>
<!-- vim: ft=xml -->
<!-- example launch script for PX4 based FCU's -->
<arg name="gcs_url" default="udp://:14556@192.168.1.100:14550" />
<arg name="fcu_url" default="udp://:14554@192.168.1.100:14555" />
<arg name="tgt_system" default="1" />
<arg name="tgt_component" default="1" />
<include file="$(find mavros)/launch/node.launch">
<arg name="blacklist_yaml" value="$(find mavros)/launch/px4_blacklist.yaml" />
<arg name="config_yaml" value="$(find mavros)/launch/px4_config.yaml" />
<arg name="fcu_url" value="$(arg fcu_url)" />
<arg name="gcs_url" value="$(arg gcs_url)" />
<arg name="tgt_system" value="$(arg tgt_system)" />
<arg name="tgt_component" value="$(arg tgt_component)" />
</include>
</launch> Is there something wrong? |
@v01d |
Perhaps there may be <launch>
<include file="$(find mavros)/launch/px4.launch">
<arg name="fcu_url" value="<url>" />
<arg name="gcs_url" value="<url>" />
</include>
</launch> Anyway your mavros looks outdated (something about version 0.8-0.9), i recommend to upgrade Next check with |
@vooon Meanwhile, when I connect pixhawk via serial port and run:
it can be connected as it shows: [ INFO] [1446334866.819164422]: MAVROS started. MY ID [1, 240], TARGET ID [1, 1] BUT when I run
it shows:
why does this happened? Can you help me? Thanks a lot |
Because:
0 - Generic - modes unknown. We support only APM (ArduPilotMega) and PX4 firmwares. |
hi, @vooon here is log when I run 'rostopic echo -n1 /diagnostics' # joel@joel-X450VC:~/catkin_ws$ rostopic echo -n1 /diagnostics
header:
seq: 23
stamp:
secs: 1446401626
nsecs: 611840330
frame_id: ''
status:
-
level: 1
name: mavros: FCU connection
message: not connected
hardware_id: udp://:14554@192.168.1.126:14555
values:
-
key: Received packets:
value: 0
-
key: Dropped packets:
value: 0
-
key: Buffer overruns:
value: 0
-
key: Parse errors:
value: 0
-
key: Rx sequence number:
value: 0
-
key: Tx sequence number:
value: 25
-
key: Rx total bytes:
value: 0
-
key: Tx total bytes:
value: 425
-
key: Rx speed:
value: 0.000000
-
key: Tx speed:
value: 17.000000
-
level: 2
name: mavros: GPS
message: No satellites
hardware_id: udp://:14554@192.168.1.126:14555
values:
-
key: Satellites visible
value: 0
-
key: Fix type
value: 0
-
key: EPH (m)
value: Unknown
-
key: EPV (m)
value: Unknown
-
level: 2
name: mavros: Heartbeat
message: No events recorded.
hardware_id: udp://:14554@192.168.1.126:14555
values:
-
key: Heartbeats since startup
value: 0
-
key: Frequency (Hz)
value: 0.000000
-
key: Vehicle type
value: Generic
-
key: Autopilot type
value: Generic
-
key: Mode
value: ''
-
key: System status
value: Uninit
-
level: 0
name: mavros: System
message: Normal
hardware_id: udp://:14554@192.168.1.126:14555
values:
-
key: Sensor present
value: 0x00000000
-
key: Sensor enabled
value: 0x00000000
-
key: Sensor helth
value: 0x00000000
-
key: CPU Load (%)
value: 0.0
-
key: Drop rate (%)
value: 0.0
-
key: Errors comm
value: 0
-
key: Errors count #1
value: 0
-
key: Errors count #2
value: 0
-
key: Errors count #3
value: 0
-
key: Errors count #4
value: 0
-
level: 2
name: mavros: Battery
message: No data
hardware_id: udp://:14554@192.168.1.126:14555
values:
-
key: Voltage
value: -1.00
-
key: Current
value: 0.0
-
key: Remaining
value: 0.0
--- So, it shows:
But it still shows:
when I run
I really confused.. :{ |
anyone help??? |
Autopilot is still |
And then it it not mavros but firmware side. |
do you mean that something is wrong with my pixhawk Firmware? |
Oh, i overlooked this:
not connected - check your connection URL! |
hi @vooon
jMAVSim can't connect with Mavros, as it shows:
no heartbeat! here is my launch file : <launch>
<!-- vim: ft=xml -->
<!-- example launch script for PX4 based FCU's -->
<arg name="fcu_url" default="udp://:14554@localhost:14555" />
<arg name="gcs_url" default="udp://:14556@localhost:14550" />
<arg name="tgt_system" default="1" />
<arg name="tgt_component" default="50" />
<include file="$(find mavros)/launch/node.launch">
<arg name="config_yaml" value="$(find mavros)/launch/px4_config.yaml" />
<arg name="pluginlists_yaml" value="$(find mavros)/launch/px4_pluginlists.yaml" />
<arg name="fcu_url" value="$(arg fcu_url)" />
<arg name="gcs_url" value="$(arg gcs_url)" />
<arg name="tgt_system" value="$(arg tgt_system)" />
<arg name="tgt_component" value="$(arg tgt_component)" />
</include>
</launch> it really confused me.. |
well, I have another question, in jMAVSim, when I start jMAVSim, it can communicate with px4, but the log shows: joel@joel-X450VC:~/jMAVSim$ java -Djava.ext.dirs= -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -serial /dev/ttyACM0 921600 -qgc WARNING: Got heartbeat from system #2 but configured to only accept messages from system #1. Please change the system ID parameter to match in order to use HITL/SITL. how to fix this problem? Is that related to MAV_SYS_ID? |
It is related to network connection. Until you got:
There no connection. Why? Who knows... But first check what ports actually jMAVSim actually listens. I'm not sure, perhaps there some changes in jMAVSim, check sources. |
hi, @vooon
I read the setup at https://pixhawk.org/dev/ros/mavros_offboard: Make sure the flight controller gets a stream of setpoints (0.5s timeout) before you switch to offboard mode. The system will reject offboard otherwise so I follow above: first, arm the multirotor, done but it still says:
I am really confused. BTW, another question, when I use QGC via UDP, QGC popup window says:
then the connection will be lost. Thanks |
I forget one thing, when I use the command:
instead of using my transmitter switch, it shows the log on mavros terminal:
Do you have any idea about this? Thanks |
Please show diagnostics again. |
hi, @vooon here is the diagnostics log:
|
do you have any free time? could I invite you to gitter? |
You may ask at mavros gitter channel. You setted wrong UDP URL So it got self heartbeat: -
key: Vehicle type
value: Onboard-Controller
-
key: Autopilot type
value: INVALID |
@DrTon there still some problem with connection. We trying to setup following scheme: |
strict graph {
subgraph ros {
graph [
label="ROS",
compound=True,
lheight=0.21,
rank=same,
style=bold]
node [style=filled]
mavros;
gcs_bridge;
}
"Pixhawk" -- "mavros" [label="/dev/ttyACM0:921600"]
"mavros" -- "jMAVSim" [label="udp://:14560@localhost:14565"]
"mavros" -- "gcs_bridge" [label="ROSUDP"]
"gcs_bridge" -- "QGroundControl" [label="udp://:14575@localhost:14570"]
} |
Hi, @vooon are you online? in mavros it shows:
when I run rosrun mavros mavsys |
@killerlayup seems that your error with arming related to #423. |
@killerlayup i fixed #423. Can you update and check? |
hi @vooon |
Hi @killerlayup, |
Hi @iceicehyhy |
Hi @killerlayup , I followed the steps posted by @weiweikong, but the communication between QGC--->Mavros is not stable as I could always see " Connection Lost" . Any idea to solve this issue? |
@iceicehyhy |
@iceicehyhy |
@killerlayup #427 - silent. You may try to use TCP connection method for GCS. Simply change gcs_url to |
yes! it works! thanks man @vooon |
Finally :) i think may close issue now. |
Why we here use TCP connection not UDP ? @vooon |
Just to eliminate possible interference with other mavlink talker programs that uses UDP. I wanted to make multicast UDP transport, so port problem will gone. But really nobody support that now. |
@vooon |
@iceicehyhy yep |
@killerlayup yes, it works. thank you! |
@vooon @iceicehyhy when I connect via TCP, QGC popups window:
|
need help~~ |
Hi, all
I follow the setup on http://pixhawk.org/dev/ros/hil, and can start jMAVSim and verify that it is communicating with the Pixhawk as it prints:
but when I run :
It seems that it is not communicating with pixhawk, no heartbeat. when I run:
it shows:
by the way, I use ubuntu 12.04,and px4 firmware, really need help~
The text was updated successfully, but these errors were encountered: