MAVSDK shows as "Vehicle 190"

Created on 31 Dec 2019  路  6Comments  路  Source: mavlink/MAVSDK

My Setup:

PX4 SITL <-> Mavlink Router <-> MAVSDK
                            <-> QGC

When using the MAVLink Inspector in QGC, I can see:
Vehicle 1 -> all expected PX4 SITL messages
Vehicle 190 -> HEARTBEAT, TIMESYNC

Why is MAVSDK showing as "Vehicle 190"?

Also I saw that UUIDs are used now - is there a good overview somewhere on how system ID vs. UUID come into play?

question

Most helpful comment

@JonasVautherin I for one would prefer it greatly if we could expose both the system ID as well as the component ID in the Configuration, and furthermore make this available in the gRPC bindings. Also, QGC's sysid is not hardcoded - it's set to 255 by default, but this can be changed under Application Settings -> MAVLink. After fishing through some old PRs on the QGC repo, it looks like it hardcodes the MAV_COMP_ID_MISSIONPLANNER as its component ID.

All 6 comments

This is because MAVSDK currently identifies itself as MISSION_PLANNER:

uint8_t MavsdkImpl::get_own_system_id() const
{
    switch (_configuration.load()) {
        case Mavsdk::Configuration::GroundStation:
            return MAV_COMP_ID_MISSIONPLANNER;

I believe that one should be able to set the system id through the configuration:

void MavsdkImpl::set_configuration(Mavsdk::Configuration configuration)

Configuration is currently an enum class:

    enum class Configuration {
        Autopilot, /**< @brief SDK is used as an autopilot. */
        GroundStation, /**< @brief SDK is used as a ground station. */
        CompanionComputer /**< @brief SDK is used on a companion computer onboard the system (e.g.
                             drone). */
    };

But maybe it should contain the sysid, too.

@julianoes: Do you have an opinion on that?

@JonasVautherin My confusion is mainly because I though "Vehicle" would show the system ID, not the component ID. If not, what is a "Vehicle" in MAVLink terms?

"Vehicle" would show the system ID

It does. We just return MAV_COMP_ID_MISSIONPLANNER as the system id, which is "190". So I would say that the peculiarity is on MAVSDK's side :sweat_smile:.

I guess a ground control station like QGC, should have a sysid that is just unique in the network, and use MAV_COMP_ID_MISSIONPLANNER as the component id. I'm not sure what QGC does for the component id, but I believe its sysid is hardcoded to 255...

@JonasVautherin I for one would prefer it greatly if we could expose both the system ID as well as the component ID in the Configuration, and furthermore make this available in the gRPC bindings. Also, QGC's sysid is not hardcoded - it's set to 255 by default, but this can be changed under Application Settings -> MAVLink. After fishing through some old PRs on the QGC repo, it looks like it hardcodes the MAV_COMP_ID_MISSIONPLANNER as its component ID.

@JonasVautherin I think this can be closed ever since the new Configuration class including system and component ID was merged?

Yes, thanks @coderkalyan :blush:

Was this page helpful?
0 / 5 - 0 ratings