MAV_1_CONFIG=TELEM 2
MAV_1_FORWARD=Disabled (also tried Enabled)
MAV_1_MODE=Onboard
MAV_1_RATE=80000 B/s (we've tried also to set 0)
SER_TEL2_BAUD=921600 8N1
But mavros didn’t connect to the flight controller.
After we changed the value of MAV_1_MODE to normal it started to work, but partially. When we’ve tried to change a flight mode to ‘OFFBOARD’ we received FCU: REJECT OFFBOARD.
Here is two logs from mavros node, with normal and onboard values: Pixhawk CUBE, px4 1.9.2, Onboard communication problems · GitHub
Could anyone help, please, what should we change to make it working?
Thanks!
Thank you for your replay, but actually I didn’t catch what you mean.
As I said above, the environment is the same, what means that I started the mavros with the sys_status plugin enabled. So, the mavros node tries to send a heartbeat message, but only to a connected device. If I start this node with pixhawk with 1.8.2 connected, all works well. With the same node, the same onboard computer, the same pixhawk, but with 1.9.2 it doesn’t work.
you are sending companion process messages to the flight controller
You need to actively send companion process status messages to the flight controller. It is on /mavros/companion_process/status. Otherwise the flight controller will think that the companion computer has died and will ignore all the setpoints
Hm… I’m not quite sure, that I understand you properly.
Could you please, share with me the manual, where I can find something about this changes?
We’ve never sent any messages to this topic by our code before.
I’ve also checked this manual and haven’t noticed any mentions of /mavros/companion_process/status: https://dev.px4.io/v1.9.0/en/ros/mavros_offboard.html
The same with: http://wiki.ros.org/mavros
@Jaeyoung-Lim is there the required frequency for publishing into this topic? And what the required content for this messages?
I wrote a code, that publishes into /mavros/companion_process/status, but still has no response from the flight controller:
@szobov can you share the flight controller log trough flight review?
You don’t need to send /mavros/companion_process/status unless you have set the parameter COM_OBS_AVOID to true.
@mrivi yes, but I’ve never seen this message on 1.8.2, so I’ve decided, that it’s OK.
To be honest, I don’t know, how it’s related to this issue. Could you explain it to me a ted, please?
–
EDIT
I’ve tried to arm the copter and fly in poshold and it’s flying as usual. Nothing bizarre. But before the flight the copter wasn’t calibrated, in QGC has been a message about uncalibrated magnetometer. Maybe this error message relates to uncalibrated mag.
That’s the IMU driver. Have you ever flown any other mode other than stabilized?
What message are you sending from ROS to control the vehicle? How are you filling it? At which rate is it sent?
Have you ever flown any other mode other than stabilized?
On the previous firmware version, 1.8.2, yes, in poshold, althold, auto-takeoff, auto-land and mission modes.
But on 1.9.2 only in the stabilized mode.
What message are you sending from ROS to control the vehicle?
With velocity vector, yaw, stamp, seq, frame_id, coordinate_frame and type_mask.
To clarify, we didn’t change the code, that send this message, so it works stable on 1.8.2.
@mrivi yes, but the problem isn’t in the OFFBOARD mode, because we can’t receive anything from autopilot before posting any setpoints.
If you’ll look back onto my previous messages, you’ll see, that when I configure MAV_*_MODE as onboard I receive only:
it isn’t receiving the setpoint that you’re publishing from ROS
This log message with FCU: REJECT OFFBOARD appears only in case of MAV_*_MODE=normal, but I don’t think it should work this way, because normal mode is for telemetry, not for onboard computer, right?
Also, I just want to say, that I’m absolutely sure, that everything is connected normally, because I can just downgrade the firmware version to 1.8.2 and return SYS_COMP_ID and everything will start to communicate as expected.
In the first manual, you set parameter SER_TEL2_BAUD to set baudrate.
Otherwise, in the second - you set baudrate with MAV_2_RATE, as I guess by the value 912000 in that manual (it looks like one of standard baudrate of serial port), but… that conjecture is in conflict with words in documentation in https://github.com/PX4/Firmware/blob/19ad80385e80273120469e423f5cded5e8c182f7/src/modules/mavlink/module.yaml#L47. And there also saying about MAV_2_FORWARD=True, but nothing about that parameter in the first manual. It confuse.
@mrivi could you, please, say, what documentation is correct?
P.S. Guess, the basic idea of version 1.9.x is to switch to configure serial ports with MAV_X_* parameters. Is it?