Open rajeev-gupta-bashrc opened 3 weeks ago
Solved using this: https://github.com/PX4/PX4-Autopilot/pull/23881/files
why not just use ctrl+c?
@dakejahl actually we wanted to automate the launch and shut down process, that's why ctrl+c wasn't an option for us. We feed the kill command and it kills the process. Thank you for looking into it. If you can suggest some changes, we welcome you.
@rajeev-gupta-bashrc if you're automating the launch/shutdown you can just kill the process from your own scripts? Ctrl+C is just sending SIGINT. I don't think adding a pkill -f to the cpp code is the right place to do it.
In the gazebo simulation the shutdown command doesn't kills the gz server, and the gazebo gui remains open with the terminal being unresponsive. If we further kill the background processes by ctrl+c then gazebo doesn't open for the next time. We need to restart the pc (this restarting issue is related to gazebo/gz-server if we don't properly kill the gz-server).