I tried running the px4 sitl on gazebo with mavros and encountered this issue:
error loading <rosparam> tag:
file /home/catkin_ws/src/mavros/mavros/launch/px4_config.yaml contains invalid YAML:
could not determine a constructor for the tag '!degrees'
in "<string>", line 63, column 27:
angular_velocity_stdev: !degrees 0.02
^
XML is <rosparam command="load" file="$(arg config_yaml)"/>
The traceback for the exception was written to the log file
I have previous tried running the multi uav simulation and had no trouble with it. Recently I had to create a fresh installation on a new computer and I am having trouble running mavros and px4 sitl together. How should I rectify this issue?
Any help is appreciated. Thanks in advance.
I have the same issue with you, I also made a clean ubuntu installation. In addition, I can say that I initially used ubuntu 16.04.5 (Everything worked here) and was updated to 16.04.6 (And here it is not)
UPD: Well, I just deleted the exclamation mark in front of the degrees in the file indicated by the error. Everything is working. Does this exclamation mark mean something?
I am having the same issue. Does anybody know why this is happening?
I solved the issue by downgrading PyYAML from 5.1 to 3.13 manually with "pip uninstall PyYAML" and "pip install PyYAML==3.13"
I can confirm that downgrading PyYAML from 5.1 to 3.13 works
I ran into this today as well. What is this exclamation mark for?

I have the same issue.
For now a workaround is this change:
diff --git a/mavros/launch/px4_config.yaml b/mavros/launch/px4_config.yaml
index d199f17..a3edcce 100644
--- a/mavros/launch/px4_config.yaml
+++ b/mavros/launch/px4_config.yaml
@@ -60,7 +60,7 @@ imu:
frame_id: "base_link"
# need find actual values
linear_acceleration_stdev: 0.0003
- angular_velocity_stdev: !degrees 0.02
+ angular_velocity_stdev: "!degrees 0.02"
orientation_stdev: 1.0
magnetic_stdev: 0.0
@@ -211,7 +211,7 @@ odometry:
# px4flow
px4flow:
frame_id: "px4flow"
- ranger_fov: !degrees 6.8 # 6.8 degreens at 5 meters, 31 degrees at 1 meter
+ ranger_fov: "!degrees 6.8" # 6.8 degreens at 5 meters, 31 degrees at 1 meter
ranger_min_range: 0.3 # meters
ranger_max_range: 5.0 # meters
but I assume that changes behavior and is not the right fix.
I also have a similar error, is there any solution to fix in this case?

@jsalvador4 see my answer above.
My error appears in another line, should I also edit the !degree lines as you noted?
Check what's causing your issue and see what can fix it.
https://github.com/mavlink/mavros/commit/1e9d805632eb6133c46859104f0fcec2778accdc#diff-1081d05fe29e8c7f51693863fe64cd9f
@jsalvador4 this should fix your issue (in my case i have exactly the same error and it helps)
@w0rt4 Thanks, worked fine!
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
Most helpful comment
I solved the issue by downgrading PyYAML from 5.1 to 3.13 manually with "pip uninstall PyYAML" and "pip install PyYAML==3.13"