MAVROS and mavproxy aren't working together

I am running mavros using this command

roslaunch mavros apm.launch fcu_url:=/dev/ttyTHS0:921600

and mavproxy with the following command --master=/dev/ttyTHS0 --baudrate 921600 --aircraft MyCopter

The mavros stops working


Serial ports can only be assigned to 1 program at a time. They can’t be shared.

if anyone is looking for a solution, this answer helped me