Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

TjarkT

Tjark

@Tjark
Contributor
Unfollow Follow
About
Posts
28
Topics
9
Shares
0
Groups
1
Followers
1
Following
0

Posts

Recent Best Controversial

  • voxl-mavlink-server incorrectly sets UTC clock from GPS time
    TjarkT Tjark

    @Eric-Katzfey Thanks for your update. We tried it on one of our drones but we had some strange issues regarding invalid setpoints afterwards and we think it may be caused by a voxl-px4 version mismatch. We were running version 1.14.0-2.0.98 of voxl-px4 and the version you provided is 1.14.0-2.0.116. Would it be difficult to provide a patch for version 1.14.0-2.0.98?

    We also had our first log of that it occurred again with our forked voxl-mavlink-server. The drone continued its flight now which is good. This is the changed function:

    void mavlink_services_handle_system_time(mavlink_message_t* msg)
    {
    	// collect and consolidate information
    	int64_t time_now_ns = my_time_realtime_ns();
    	int64_t time_now_s = time_now_ns / 1e9;
    	int64_t gps_time_us = mavlink_msg_system_time_get_time_unix_usec(msg);
    	int64_t gps_time_s = gps_time_us / 1e6;
    
    	// check gps time is valid
    	if(gps_time_s == 0) return;
    
    	bool within_10_seconds_original = abs(time_now_s - gps_time_s)<10;
    	bool within_10_seconds_correct = llabs(time_now_s - gps_time_s)<10;
    
    	if (within_10_seconds_original != within_10_seconds_correct) {
    		printf(
    			"WARNING! The check if we are within 10 seconds gives an incorrect result due to wrong usage of abs.\n"
    			"Original: %s, Correct: %s (time_now_s=%lld, gps_time_s=%lld, diff_original=%d, diff_correct=%lld)\n",
    			within_10_seconds_original ? "true" : "false",
    			within_10_seconds_correct  ? "true" : "false",
    			(long long)time_now_s,
    			(long long)gps_time_s,
    			abs(time_now_s - gps_time_s),               // truncated 32-bit diff
    			llabs(time_now_s - gps_time_s)              // correct 64-bit diff
    		);
    	}
    
    	// if we are within 10 seconds, good enough
    	if(within_10_seconds_correct){
    		if(time_needs_setting){
    			printf("detected system time has already been set\n");
    		}
    		time_needs_setting = 0;
    		return;
    	}
    	else time_needs_setting = 1;
    
    	if(!time_needs_setting) return;
    
    	struct timespec ts_now;
    	ts_now.tv_sec = time_now_s;
    	ts_now.tv_nsec = 0;
    
        struct timespec ts_gps;
        ts_gps.tv_sec = gps_time_s;
        ts_gps.tv_nsec = 0;
    	
    	printf("WARNING! System wants to use GPS system time message to set UTC clock from %s to: %s",
    		   asctime(gmtime(&ts_now.tv_sec)),
    		   asctime(gmtime(&ts_gps.tv_sec)));
    	printf("We will ignore this system time message and we won't update the clock");
    
        // if (clock_settime(CLOCK_REALTIME, &ts) < 0) {
        //     perror("Failed to set system time to GPS time");
        //     return;
        // }
    
    	time_needs_setting = 0;
    
    	return;
    }
    

    And we got log lines like this:

    Nov 07 09:07:28 JOHN voxl-mavlink-server[2237]: We will ignore this system time message and we won't update the clockWARNING! System wants to use GPS system time message to set UTC clock from Fri Nov  7 09:07:29 2025
    Nov 07 09:07:28 JOHN voxl-mavlink-server[2237]:  to: Fri Nov  7 09:07:29 2025
    Nov 07 09:07:28 JOHN voxl-mavlink-server[2237]: We will ignore this system time message and we won't update the clockWARNING! System wants to use GPS system time message to set UTC clock from Fri Nov  7 09:07:30 2025
    Nov 07 09:07:28 JOHN voxl-mavlink-server[2237]:  to: Fri Nov  7 09:07:30 2025
    Nov 07 09:07:28 JOHN voxl-mavlink-server[2237]: We will ignore this system time message and we won't update the clockWARNING! System wants to use GPS system time message to set UTC clock from Fri Nov  7 09:07:31 2025
    Nov 07 09:07:28 JOHN voxl-mavlink-server[2237]:  to: Fri Nov  7 09:07:31 2025
    Nov 07 09:07:28 JOHN voxl-mavlink-server[2237]: We will ignore this system time message and we won't update the clockWARNING! System wants to use GPS system time message to set UTC clock from Fri Nov  7 09:07:32 2025
    Nov 07 09:07:28 JOHN voxl-mavlink-server[2237]:  to: Fri Nov  7 09:07:32 2025
    Nov 07 09:07:28 JOHN voxl-mavlink-server[2237]: We will ignore this system time message and we won't update the clockWARNING! System wants to use GPS system time message to set UTC clock from Fri Nov  7 09:07:33 2025
    Nov 07 09:07:28 JOHN voxl-mavlink-server[2237]:  to: Fri Nov  7 09:07:33 2025
    

    but I don't yet understand why it is triggering this log because both timestamps seem to be identical. Maybe you have an idea?

    VOXL SDK

  • voxl-mavlink-server incorrectly sets UTC clock from GPS time
    TjarkT Tjark

    @Eric-Katzfey Ok, thanks. Looking forward to it. For now, we have put a forked version of voxl-mavlink-server on 1 drone which had this issue a few times. This forked version will log the requested time offset instead of applying it. If we get a log from that, we will post it here if that helps.

    VOXL SDK

  • voxl-mavlink-server incorrectly sets UTC clock from GPS time
    TjarkT Tjark

    @Eric-Katzfey Thanks for your prompt response! I think it is going down because it gets out of offboard mode because when the time is updated some of our processes also don't work properly anymore. But I don't know if it is only our processes which are affected.

    The drone already had GPS disabled when this happened:

    AIRFRAME=MULTICOPTER
    GPS=NONE
    RC=CRSF_MAV
    ESC=VOXL_ESC
    POWER_MANAGER=VOXLPM
    AIRSPEED_SENSOR=NONE
    DISTANCE_SENSOR=NONE
    OSD=DISABLE
    DAEMON_MODE=ENABLE
    SENSOR_CAL=ACTUAL
    ARTIFACT_MODE=DISABLE
    EXTRA_STEPS=()
    

    We are not connected to a GCS. Just PX4. We haven't seen this issue on sdk 1.1.3 (our previous version) but sometimes on sdk 1.4.5 (our current version) and also on multiple drones.

    VOXL SDK

  • voxl-mavlink-server incorrectly sets UTC clock from GPS time
    TjarkT Tjark

    We have experienced an issue where the system clock of the voxl is set based on a system time message received via mavlink which causes all kinds of timing issues resulting in an immediate drone landing/crash. The time which is set is incorrect. In one instance I even saw that it sets it to a day ahead. Note that it only sometimes happens. Most of our flights don't have this issue but when it happens it is a direct problem.

    In our logs we see the following log lines

    Oct 27 08:21:29 JOHN voxl-mavlink-server[2280]: setting UTC clock from GPS to: Mon Oct 27 08:20:15 2025
    Oct 27 08:21:29 JOHN voxl-mavlink-server[2280]: setting UTC clock from GPS to: Mon Oct 27 08:20:16 2025
    Oct 27 08:21:29 JOHN voxl-mavlink-server[2280]: setting UTC clock from GPS to: Mon Oct 27 08:20:17 2025
    Oct 27 08:21:29 JOHN voxl-mavlink-server[2280]: setting UTC clock from GPS to: Mon Oct 27 08:20:18 2025
    Oct 27 08:21:29 JOHN voxl-mavlink-server[2280]: setting UTC clock from GPS to: Mon Oct 27 08:20:19 2025
    Oct 27 08:21:29 JOHN voxl-mavlink-server[2280]: setting UTC clock from GPS to: Mon Oct 27 08:20:20 2025
    Oct 27 08:21:29 JOHN voxl-mavlink-server[2280]: setting UTC clock from GPS to: Mon Oct 27 08:20:21 2025
    

    The software versions on this drone are:

    ────────────────────────────────────────────────────────────────────────────────
    system-image: 1.8.02-M0054-14.1a-perf
    kernel:       #1 SMP PREEMPT Mon Nov 11 22:47:44 UTC 2024 4.19.125
    ────────────────────────────────────────────────────────────────────────────────
    hw platform:  M0054
    mach.var:     1.0.1
    SKU:          MCCA-M0054-C28-T0-M0-X0
    ────────────────────────────────────────────────────────────────────────────────
    voxl-suite:   1.4.5
    ────────────────────────────────────────────────────────────────────────────────
    
     Service Name             |  Version  |  Enabled  |   Running   |  CPU Usage
    ───────────────────────────────────────────────────────────────────────────────
     docker-autorun           |    1.3.1  | Disabled  | Not Running |
     modallink-relink         |    1.1.6  | Disabled  | Not Running |
     voxl-camera-server       |    2.2.1  |  Enabled  | Not Running |
     voxl-cpu-monitor         |    0.6.0  |  Enabled  |   Running   |     0.0%
     voxl-dfs-server          |    0.2.0  | Disabled  | Not Running |
     voxl-elrs-startup        |    0.4.7  | Disabled  | Not Running |
     voxl-feature-tracker     |    0.5.2  | Disabled  | Not Running |
     voxl-flow-server         |    0.3.6  | Disabled  | Not Running |
     voxl-imu-server          |    1.1.3  |  Enabled  | Not Running |
     voxl-io-server           |    0.0.5  | Disabled  | Not Running |
     voxl-lepton-server       |    1.3.3  | Disabled  | Not Running |
     voxl-lepton-tracker      |    0.0.4  | Disabled  | Not Running |
     voxl-logger              |    0.5.3  | Disabled  | Not Running |
     voxl-mavcam-manager      |    0.5.8  | Disabled  | Not Running |
     voxl-mavlink-server      |    1.4.7  |  Enabled  |   Running   |     3.8%
     voxl-modem               |    1.1.6  | Disabled  | Not Running |
     voxl-open-vins-server    |   0.3.12  |  Enabled  | Not Running |
     voxl-osd                 |    0.1.7  | Disabled  | Not Running |
     voxl-portal              |   0.7.10  | Disabled  | Not Running |
     voxl-px4-imu-server      |    0.1.2  | Disabled  | Not Running |
     voxl-px4                 |   1.14.0  |  Enabled  |   Running   |    19.2%
     voxl-qvio-server         |    1.2.0  | Disabled  | Not Running |
     voxl-rangefinder-server  |    0.1.5  | Disabled  | Not Running |
     voxl-remote-id           |    0.0.9  | Disabled  | Not Running |
     voxl-seek-server         |   0.3.12  | Disabled  | Not Running |
     voxl-softap              |    0.3.5  | Disabled  | Not Running |
     voxl-state-estimator     |    0.0.5  | Disabled  | Not Running |
     voxl-static-ip           |    0.3.5  | Disabled  | Not Running |
     voxl-streamer            |    0.7.5  | Disabled  | Not Running |
     voxl-tag-detector        |    0.0.4  | Disabled  | Not Running |
     voxl-tflite-server       |    0.4.1  | Disabled  | Not Running |
     voxl-time-sync           |    1.4.7  | Disabled  | Not Running |
     voxl-uvc-server          |    0.1.7  | Disabled  | Not Running |
     voxl-vision-hub          |   1.8.21  |  Enabled  | Not Running |
     voxl-vrx                 |   1.3.14  | Disabled  | Not Running |
     voxl-vtx                 |   1.3.14  | Disabled  | Not Running |
     voxl-wait-for-fs         |    1.4.7  |  Enabled  |  Completed  |
    

    Where voxl-camera-server and voxl-open-vins-server are our own forked versions with some minor changes.

    We don't have GPS enabled on our drone:

    px4-param show -a | grep GPS
        ADSB_GPS_OFF_LAT [-1,5] : 0
        ADSB_GPS_OFF_LON [-1,6] : 0
    x   COM_ARM_WO_GPS [208,483] : 1
    x   EKF2_GPS_CHECK [304,586] : 245
    x + EKF2_GPS_CTRL [305,587] : 0
    x   EKF2_GPS_DELAY [306,588] : 110.0000
    x   EKF2_GPS_POS_X [307,589] : 0.0000
    x   EKF2_GPS_POS_Y [308,590] : 0.0000
    x   EKF2_GPS_POS_Z [309,591] : 0.0000
    x   EKF2_GPS_P_GATE [310,592] : 5.0000
    x   EKF2_GPS_P_NOISE [311,593] : 0.5000
    x   EKF2_GPS_V_GATE [312,594] : 5.0000
    x   EKF2_GPS_V_NOISE [313,595] : 0.3000
    x   EKF2_REQ_GPS_H [357,641] : 10.0000
        FW_GPSF_LT [-1,721] : 30
        FW_GPSF_R [-1,722] : 15.0000
        GPS_1_GNSS [-1,841] : 0
        GPS_1_PROTOCOL [-1,842] : 1
        GPS_2_GNSS [-1,843] : 0
        GPS_2_PROTOCOL [-1,844] : 1
        GPS_DUMP_COMM [-1,845] : 0
        GPS_PITCH_OFFSET [-1,846] : 0.0000
        GPS_SAT_INFO [-1,847] : 0
        GPS_UBX_BAUD2 [-1,848] : 230400
        GPS_UBX_CFG_INTF [-1,849] : 0
    x + GPS_UBX_DYNMODEL [418,850] : 6
        GPS_UBX_MODE [-1,851] : 0
        GPS_YAW_OFFSET [-1,852] : 0.0000
        LPE_GPS_DELAY [-1,937] : 0.2900
        LPE_GPS_VXY [-1,938] : 0.2500
        LPE_GPS_VZ [-1,939] : 0.2500
        LPE_GPS_XY [-1,940] : 1.0000
        LPE_GPS_Z [-1,941] : 3.0000
    x   MAV_USEHILGPS [456,999] : 0
        SENS_EN_GPSSIM [-1,1448] : 0
        SENS_GPS_MASK [-1,1484] : 7
        SENS_GPS_PRIME [-1,1485] : 0
        SENS_GPS_TAU [-1,1486] : 10.0000
        SIM_GPS_USED [-1,1555] : 10
    x + SYS_HAS_GPS [764,1658] : 0
        UAVCAN_SUB_GPS [-1,1930] : 1
        UCAN1_GPS0_SUB [-1,2048] : -1
        UCAN1_GPS1_SUB [-1,2049] : -1
        UCAN1_GPS_PUB [-1,2050] : -1
        UCAN1_UORB_GPS [-1,2053] : -1
        UCAN1_UORB_GPS_P [-1,2054] : -1
    

    Have you seen this issues before and/or do you have any idea how this could be caused?

    VOXL SDK

  • voxl_esc tone bug and question
    TjarkT Tjark

    @Alex-Kushleyev I tested it and it works nice (I didn't test the 255 but I expect that should work). I already figured that the frequencies are now multiples of 10Hz with some minimum value (I don't know which one but at least below -p 10 I don't hear the frequency drop anymore). So it ranges up to 2550Hz. And I think you also adjusted the duration to be multiples of 10ms to match with the format of the ESC parameters?

    Regarding the usage change, I understand if you don't want to create a breaking change. But I think it would be good when the print_usage matches with the actual use. It took me some trial and error to get it working. Maybe also an idea to use -f for the frequency because -p refers to period which is not correct anymore and it is now already changing the functionality of the tone generation (you could even let -p in it to keep it backwards compatible but that maybe makes it unnecessarily complicated). And also good to allow the ESC mapping to go up to 15.

    For us it is sufficient to use the startup tone. But I played around a little bit with the tone generation and if you use it using the qshell commands you need to wait the duration of the tone to send a new tone (as the qshell command immediately returns and it doesn't accept a command while the sound is still playing) which makes it difficult to get the timing right in playing a tune. I don't know what the end goal should be of this but if it is playing custom tunes using the commands this is something to keep in mind I think. I had some fun trying to play the Imperial March on the ESCs which kind of works but not as smooth as the startup sound can play.

    PX4 Autonomy Developer Kit

  • voxl_esc tone bug and question
    TjarkT Tjark

    @Alex-Kushleyev Thanks for the update! Sorry for my slow response. I was away since last Thursday. Sounds great to use the 0 values for the startup tone. That is really helpful. I will test this as soon as I can. Did you also change the frequency mapping (although I don't think I need this if I use the startup tone)?

    Will you still make the change from qshell voxl_esc [arguments...] <command> to qshell voxl_esc <command> [arguments...]? If not, can you update the print_usage: https://github.com/modalai/px4-firmware/blob/main/src/drivers/actuators/voxl_esc/voxl_esc.cpp#L1350 to match with the actual usage?

    PX4 Autonomy Developer Kit

  • voxl_esc tone bug and question
    TjarkT Tjark

    @Alex-Kushleyev Thanks for your response. Sounds good.

    For some background, we currently only put power on the ESC when we are about to fly. When the ESC is powered, the startup sound can be heard which is an audio notification to anybody closeby that this drone can soon start spinning up his motors. With the new PX4 firmware in sdk-1.3, there is a version check in the ESC initialization which now fails because we haven't powered the ESC at that moment. We're now thinking of keeping the ESC always powered but we still want to have this audio notification when the drone is about to fly. So that's why I was looking into this and also wanted to mimic our startup tone with the same frequencies. It would be nice if we could also send a sequence of tones or reference to preconfigured sounds but else I will just send multiple commands after each other. The python script looks nice but it doesn't work for us because it requires voxl-px4 to be not running. If you have a better suggestion of playing the tones I would be interested to hear it.

    PX4 Autonomy Developer Kit

  • voxl_esc tone bug and question
    TjarkT Tjark

    I can play tones on the ESC via the following command (after running px4-alias.sh) :

    qshell voxl_esc -i 1 -p 50 -d 30 -v 20 tone
    

    This should actually be qshell voxl_esc tone -i 1 -p 50 -d 30 -v 20 but that will fail because voxl_esc will take the last command as verb but it should take argument index 2 as verb.

    Link Preview Image
    px4-firmware/src/drivers/actuators/voxl_esc/voxl_esc.cpp at f9d249f170d15c34217c849980cd8ecd4b0a17ad · modalai/px4-firmware

    PX4 Autopilot Software. Contribute to modalai/px4-firmware development by creating an account on GitHub.

    favicon

    GitHub (github.com)

    const char *verb = argv[argc - 1];
    

    should be

    const char *verb = argv[2];
    

    If you put the tone in front you get the following usage message:

    Aug 06 10:10:11 SPOT voxl-px4[11774]: INFO  [muorb] SLPI:
    Aug 06 10:10:11 SPOT voxl-px4[11774]: ### Description
    Aug 06 10:10:11 SPOT voxl-px4[11774]: This module is responsible for...
    Aug 06 10:10:11 SPOT voxl-px4[11774]: ### Implementation
    Aug 06 10:10:11 SPOT voxl-px4[11774]: By default the module runs on a wor
    Aug 06 10:10:11 SPOT voxl-px4[11774]: INFO  [muorb] SLPI: Usage: voxl_esc <command> [arguments...]
    Aug 06 10:10:11 SPOT voxl-px4[11774]: INFO  [muorb] SLPI:  Commands:
    

    which says the <command> (tone) should be in front of the arguments.


    I have a question about the usage. The documentation says this:

    Aug 06 10:10:28 SPOT voxl-px4[11774]:    tone          Send tone generation request to ESC
    Aug 06 10:10:28 SPOT voxl-px4[11774]: INFO  [muorb] SLPI:      -i <val>    ESC ID, 0-3
    Aug 06 10:10:28 SPOT voxl-px4[11774]: INFO  [muorb] SLPI:      -p <val>    Period of sound, inverse frequency, 0-255
    Aug 06 10:10:28 SPOT voxl-px4[11774]: INFO  [muorb] SLPI:      -d <val>    Duration of the sound, 0-255, 1LSB = 13ms
    Aug 06 10:10:28 SPOT voxl-px4[11774]: INFO  [muorb] SLPI:      -v <val>    Power (volume) of sound, 0-100
    

    I want to know how the period relates to the tone frequency in Hz. The documentation is not correct or incomplete because I can hear a sound with period=0 which should be an infinitely high frequency. When I want to play a tone of 2110 Hz, the inverse is 0,0004739 seconds. I thought there is maybe a scaling factor of 1e5 to make it within the range of 0-255 but the sounds I hear do not match up with the frequencies I expect. How does it work?

    PX4 Autonomy Developer Kit

  • Possible bug in libmodal_pipe server.c
    TjarkT Tjark

    @James-Strawson Thanks for your reply! It made me realise what the error must be. We use a locally cloned repository for libmodalpipe because we want to build our software directly on the drone. This is then used in the build and link process of our software. This happened to be on the 'master' branch and not the 'SDK-1.0.0' branch. So the pipe clients use a different version than the pipe servers which is likely the cause of our errors.

    Modal Pipe Architecture (MPA)

  • Possible bug in libmodal_pipe server.c
    TjarkT Tjark

    @James-Strawson Any comment on this?

    Modal Pipe Architecture (MPA)

  • mpa_to_ros node crashes after subscribing to /hires topics
    TjarkT Tjark

    I have the same issue. If you try it multiple times sometimes it will work but most of the times it will crash like shown.

    Ask your questions right here!

  • Possible bug in libmodal_pipe server.c
    TjarkT Tjark

    @James-Strawson I still haven't found the root cause but I wanted to share some of my findings. Maybe you can help my understanding. A little bit of background: we don't want to power off the drone but when we are not flying we go into a sleep state where we shut down some of the voxl programs and our own programs. Then when we wake up we start up the programs and everything should work again. It is after about 6 of these cycles where we have this issue (so it also takes a while to reproduce).

    Here is some logging of where the problem just kicked in:

    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: write to ch: 0 id: 14 result: -1 errno: 32
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: write error: Broken pipe
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: previous client state was 2
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: Client voxl_pipe_handler-232508 (id 14) disconnected from channel 0
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: write to ch: 0 id: 15 result: -1 errno: 32
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: write error: Broken pipe
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: previous client state was 1
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: Client voxl_pipe_handler695511 (id 15) disconnected from channel 0
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: ERROR in pipe_server_write_to_client, client_id should be between 0 & 15
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: write to ch: 1 id: 14 result: -1 errno: 32
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: write error: Broken pipe
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: previous client state was 2
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: Client voxl_pipe_handler672850 (id 14) disconnected from channel 1
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: write to ch: 1 id: 15 result: -1 errno: 32
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: write error: Broken pipe
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: previous client state was 1
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: Client voxl_pipe_handler507424 (id 15) disconnected from channel 1
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: ERROR in pipe_server_write_to_client, client_id should be between 0 & 15
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: ERROR in pipe_server_write_to_client, client_id should be between 0 & 15
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: ERROR in pipe_server_write_to_client, client_id should be between 0 & 15
    Aug 19 20:15:14 QUAD voxl-vision-hub[1524]: ERROR in pipe_server_write_to_client, client_id should be between 0 & 15
    

    voxl_pipe_handler is our own program. When this was logged we weren't properly closing the pipe when our program was terminated so that could explain the write errors. But after handling that correctly, we still have the issue of client_id should be between 0 & 15.

    A few questions. The id behind the client name seems to be a random number although the commit which adds the random number is after SDK-1.0.0. (https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-pipe/-/commit/b5fc28c9fc41184e0bbeee09c7f1867f9dbc1121). How is that possible? Did you deploy it well? This is the version we use:

    QUAD:~$ apt show voxl-vision-hub 
    Package: voxl-vision-hub
    Version: 1.6.6
    Priority: optional
    Section: base
    Maintainer: James Strawson <james@modalai.com>
    Installed-Size: unknown
    Provides: voxl-vision-px4
    Depends: librc-math,libmodal-pipe(>=2.4.0),libmodal-json,voxl-mpa-tools(>=0.2.5),voxl-mavlink-server,libmodal-cv(>=0.3.1)
    Conflicts: voxl-vision-px4,voxl-mavlink-server(<<1.0.0)
    Replaces: voxl-vision-px4
    Download-Size: 88.4 kB
    APT-Manual-Installed: yes
    APT-Sources: file:/data/voxl-suite-offline-packages ./ Packages
    Description: main hub managing communication between VOXL MPA services and autopilots
    

    In https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-pipe/-/blob/master/library/src/misc.c?ref_type=heads#L168, I think you're taking the modulo of a possible negative number. The modulo can then also be a negative number (https://stackoverflow.com/questions/7594508/modulo-operator-with-negative-values) so your result is not within the specified range. See also the logging above containing a negative number.

    I think that reconnecting a pipe with the same name makes that a new client id is used, possibly due to the random number in the name and then no two client names will be the same. I also saw that you changed something in that part of the code in this commit: https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-pipe/-/commit/773de63cb73000c08df1b04bc4e2f1e78e700816 Do you think that that could be the case? I will try to test that.

    Modal Pipe Architecture (MPA)

  • Possible bug in libmodal_pipe server.c
    TjarkT Tjark

    I was looking through the libmodal_pipe code because we have some issues with an error ERROR in pipe_server_write_to_client, client_id should be between 0 & 15 and I'm not sure what is causing this. We are restarting voxl programs often and I think something goes wrong with connecting/disconnecting pipes but I haven't figured it out yet.

    But when I looked through the code I saw that here all file descriptors are closed: https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-pipe/-/blob/master/library/src/server.c?ref_type=heads#L1611. But a few lines above that (https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-pipe/-/blob/master/library/src/server.c?ref_type=heads#L1568), c[ch].n_clients is set to 0 so I think the code at line 1611 isn't doing anything. I don't know if it gives problems and it is probably not related to my problem but I wanted to point it out to you.

    Modal Pipe Architecture (MPA)

  • Connect RC controller with SDK 1.0.0/PX4 1.14
    TjarkT Tjark

    @Eric-Katzfey thanks for the update, although it is a pity since it used to work. Do you have an idea when support will be added again?

    VOXL 2

  • Most VOXL 2 hires-capable camera ports nonfunctional after SDK 1.0 flash
    TjarkT Tjark

    @brycek That's great!

    @Modalai could you still answer the question if this is a good way of handling this?

    VOXL 2

  • Can't install ros-melodic-tf2-geometry-msgs with voxl-suite 1.0.0
    TjarkT Tjark

    @ModalAI could you answer this question?

    ROS

  • Connect RC controller with SDK 1.0.0/PX4 1.14
    TjarkT Tjark

    We are trying to get a drone working with SDK 1.0.0 but we are unable to get a RC controller properly connected. It worked with SDK 0.9.5.

    We have a RadioLink RC controller connected to the VOXL2 IO board similar to the Graupner setup: https://docs.modalai.com/voxl2-io-user-guide/#using-sbus-graupner-gr-16 but we don't get RC signals through in QGroundControl. This topic seems to suggest that the VOXL2 IO board is not yet supported for SDK 1.0.0 but that is for an ESC: https://forum.modalai.com/topic/2429/voxl2-io-m0065-support-on-px4-1-14-in-sdk-1-0-0. Should it be possible to connect our RC with VOXL2 IO?

    VOXL 2

  • Most VOXL 2 hires-capable camera ports nonfunctional after SDK 1.0 flash
    TjarkT Tjark

    @brycek We had the same issue but we managed to get it working. We have the following setup with 3 cameras:

    Camera name: hires2
    Camera type: imx412
    Camera id: 0
    Camera slot: 2

    Camera name: hires
    Camera type: imx214
    Camera id: 1
    Camera slot: 3

    Camera name: tracking
    Camera type: ov7251
    Camera id: 2
    Camera slot: 4

    We added an extra option to /usr/bin/qrb5165-configure-cameras:

    17) # Hires(imx214) + Hires2(imx412) + Tracking(ov7251)
    		CAM_LIST+=("hires2:imx412:0")
    		CAM_LIST+=("hires:imx214:1")
    		CAM_LIST+=("tracking:ov7251:2")
    		BIN_LIST+=("/usr/share/modalai/chi-cdk/ov7251/com.qti.sensormodule.ov7251_4.bin")
    		BIN_LIST+=("/usr/share/modalai/chi-cdk/imx412/com.qti.sensormodule.imx412_2.bin")
    		BIN_LIST+=("/usr/share/modalai/chi-cdk/imx214/com.qti.sensormodule.imx214_3.bin")
    		;;
    

    So the camera name, type and id are used in the CAM_LIST+= part and the camera type and the camera slot are used in the BIN_LIST+= part.

    Then we can execute voxl-configure-cameras 17 which places the camera drivers in the correct places and creates a default voxl-camera-server.conf file. Then when we do voxl-camera-server --list, all the cameras will appear.

    Also small note that you need to update the file /usr/bin/qrb5165-print-camera-configs if you want the option to be shown when executing voxl-configure-cameras --help

    @ModalAI, is this the correct way to approach this or is this not recommended because problems are expected when using it this way?

    @brycek I think you can adjust it to match your situation

    VOXL 2

  • voxl_vision_hub.h missing
    TjarkT Tjark

    I installed SDK 1.0.0 on a VOXL2 and during compiling of our own code I get the following error:

    fatal error: voxl_vision_hub.h: No such file or directory
     #include <voxl_vision_hub.h>
              ^~~~~~~~~~~~~~~~~~~
    compilation terminated.
    

    I checked the folder /usr/include/ and the file is missing over there:

    voxl2:~$ ls /usr/include/voxl_*
    /usr/include/voxl_common_config.h  /usr/include/voxl_imu_server.h  /usr/include/voxl_qvio_server.h                 /usr/include/voxl_vision_px4.h
    /usr/include/voxl_cutils.h         /usr/include/voxl_io.h          /usr/include/voxl_slpi_uart_bridge_interface.h
    
    /usr/include/voxl_io:
    i2c.h  other.h  spi.h
    
    /usr/include/voxl_trajectory:
    setpoint_position.h  trajectory_evaluation.h  trajectory_interface.h  trajectory_protocol.h  trajectory_utils.h  voxl_trajectory.h
    

    I believe this is caused because the new header file is not set as public header in this file: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-vision-hub/-/blob/master/src/CMakeLists.txt#L32

    I would expect that when that is changed to

    set_target_properties(voxl-vision-hub PROPERTIES PUBLIC_HEADER "../include/voxl_vision_px4.h;../include/voxl_vision_hub.h")
    

    it will work.

    Is that correct?

    Software Development

  • Can't install ros-melodic-tf2-geometry-msgs with voxl-suite 1.0.0
    TjarkT Tjark

    I'm installing the new SDK 1.0.0 which has voxl-suite 1.0.0. When trying to install ros-melodic-tf2-geometry-msgs I get the following error:

    voxl2:~$ apt install -y ros-melodic-tf2-geometry-msgs
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     ros-melodic-tf2-geometry-msgs : Depends: ros-melodic-orocos-kdl but it is not going to be installed
                                     Depends: ros-melodic-python-orocos-kdl but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    

    I dove into it a little bit more and the issue is that ros-melodic-tf2-geometry-msgs depends on ros-melodic-orocos-kdl which in turn depends on libeigen3-dev.

    But voxl-suite now depends on voxl-feature-tracker which depends on voxl-eigen3 and voxl-eigen3 conflicts with libeigen3-dev:

    voxl2:~$ apt show voxl-eigen3
    Package: voxl-eigen3
    Version: 3.4.0
    Priority: optional
    Section: base
    Maintainer: matt.turi@modalai.com
    Installed-Size: unknown
    Conflicts: libeigen3-dev
    Replaces: libeigen3-dev, lib32-libeigen
    Download-Size: 1014 kB
    APT-Manual-Installed: yes
    APT-Sources: file:/data/voxl-suite-offline-packages ./ Packages
    Description: Eigen3 Library packaged up for APQ
    

    What is the recommended way to get ros-melodic-tf2-geometry-msgs installed? In our case we don't need voxl-feature-tracker. Is there a way to combine it with voxl-eigen3? Or should we just not use voxl-suite?

    ROS
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups