tud-cor / FS19_modROS

(partial) ROS1 integration for FarmSim19
Apache License 2.0
49 stars 12 forks source link

Improve rosPubMsg user experience #33

Closed gavanderhoorn closed 3 years ago

gavanderhoorn commented 3 years ago

This changes the behaviour of the rosPubMsg console command slightly, such that it is a bit more robust against "incorrect" orders of invocation, players not being in a vehicle, pipes not being open, etc.

It's still possible to end up in a state where FS must be shut down, but it's a bit harder to get there now.

Especially the open->close->open->... cycle was broken before 73e8c18: calling close() on an FD apparently doesn't also nil it, so all the checks for file_pipe == nil failed without explicitly nilling it.