Attaching to running PX4 1.14 + Gazebo Classic Typhoon h480


drone with gymbal


Copy this configuration in file

/platforms/posix/Debug/launch_sitl.json.in

 

Link to gist https://gist.github.com/Igor-Misic/d59c2f7eda52d4596358cbbb4583e883


or config file in ugly text format here:

{
            "name": "SITL Attach (Gazebo Classic Typhoon_h480)",
            "type": "cppdbg",
            "request": "attach",
            "program": "${command:cmake.launchTargetPath}",
            "args": [
                "${workspaceFolder}/ROMFS/px4fmu_common"
            ],
            "stopAtEntry": false,
            "cwd": "${command:cmake.buildDirectory}/rootfs",
            "environment": [
                {
                    "name": "PX4_SIM_MODEL",
                    "value": "gazebo-classic_typhoon_h480"
                }
            ],
            "linux": {
                "MIMode": "gdb",
                "externalConsole": false,
                "setupCommands": [
                    {
                        "description": "Enable pretty-printing for gdb",
                        "text": "-enable-pretty-printing",
                        "ignoreFailures": true
                    },
                    {
                        "description": "PX4 ignore wq signals",
                        "text": "handle SIGCONT nostop noprint nopass",
                        "ignoreFailures": true
                    }
                ]
            },
            "osx": {
                "MIMode": "lldb",
                "externalConsole": true,
                "setupCommands": [
                    {
                        "text": "pro hand -p true -s false -n false SIGCONT",
                    }
                ]
            }},


 

From console start the PX4 with Gazebo
make px4_sitl gazebo-classic_typhoon_h480

Follow the steps from the images below until you get disconnect icon at point 6.



gazebo,classic,debug,gdb,VSCode,attach,Typhoon h480,PX4,


If you find this useful you can consider to buy me a coffee


Buy Me A Coffee

Comments

Popular posts from this blog

AUTOSAR and CRC calculation

Flashing/debugging/running code at external memory in the memory-mapped mode

Debugging EK-TM4C123GXL with Visual Studio Code on Linux