Skip to content

Instantly share code, notes, and snippets.

View monabf's full-sized avatar

monabf

  • Paris, France
View GitHub Profile
@monabf
monabf / bluerov2_ardusub_sitl_tutorial.txt
Last active January 26, 2024 11:12
Tutorial on how to set up Gazebo simulations of the BlueROV2 (model provided by BlueElectrics), using SITL and ArduSub, and a package provided by kdkalvik for use with mavros.
This folder provides simulation of the BlueROV2 using Gazebo for the dynamics and ArduPilot SITL for the communication and ground control.
Source: https://gist.github.com/patrickelectric/60a1d300e0afadf85066cc5d8e3d51ff
http://discuss.bluerobotics.com/t/ardusub-simulation-sitl/481/30
-------------------------------------------------------------------------------------------------------------------------
#!/usr/bin/env python
import rospy
from mavros_msgs.srv import SetMode
from mavros_msgs.srv import CommandBool
from mavros_msgs.srv import CommandTOL
from geometry_msgs.msg import PoseStamped
from mavros_msgs.msg import State
from sensor_msgs.msg import NavSatFix
from mavros_msgs.msg import OverrideRCIn
from mavros_msgs.msg import ParamValue
I1212 14:49:36.175448 5763 rosbag_validate_main.cc:154] Time delta histogram for consecutive messages on topic "/imu_data" (frame_id: "fcu"):
Count: 2380 Min: 0.193000 Max: 0.241000 Mean: 0.224532
[0.193000, 0.197800) Count: 1 (0.042017%) Total: 1 (0.042017%)
[0.197800, 0.202600) Count: 0 (0.000000%) Total: 1 (0.042017%)
[0.202600, 0.207400) Count: 0 (0.000000%) Total: 1 (0.042017%)
[0.207400, 0.212200) Count: 19 (0.798319%) Total: 20 (0.840336%)
[0.212200, 0.217000) # Count: 65 (2.731092%) Total: 85 (3.571429%)
[0.217000, 0.221800) #### Count: 512 (21.512606%) Total: 597 (25.084034%)
[0.221800, 0.226600) ######### Count: 1065 (44.747898%) Total: 1662 (69.831932%)
[0.226600, 0.231400) ##### Count: 545 (22.899160%) Total: 2207 (92.731094%)