Commander
description of the file commander.py
The class Commander deals with the publication of pwm to the RC_channels topics that leads to the motion of the BlueRov2
ROS
Node
Commander
Topics
ROS topics subscribed
Message
Function
/Command/depth
UInt16
/Command/heading
UInt16
/Command/velocity
UInt16
/Command/joy
sensor_msgs/Joy
/Settings/set_depth
bluerov_ros_playground/Set_depth
enable to send pwm to thrusters
/Settings/set_heading
bluerov_ros_playground/Set_heading
enable to send pwm to thrusters
/Settings/set_velocity
bluerov_ros_playground/Set_velocity
enable to send pwm to thrusters
ROS topics published
Message
Function
/BlueRov2/rc_channel3/set_pwm
UInt16
Throttle
/BlueRov2/rc_channel4/set_pwm
UInt16
Yaw
/BlueRov2/rc_channel5/set_pwm
UInt16
Forward
/BlueRov2/rc_channel6/set_pwm
UInt16
Lateral
/BlueRov2/rc_channel8/set_pwm
UInt16
Camera tilt
RC Input
Channel
Meaning
1
Pitch
2
Roll
3
Throttle
4
Yaw
5
Forward
6
Lateral
7
Camera pan
8
Camera tilt
9
Light 1 level
10
Light 2 level
11
Video switch
Modes
There are two modes in commander : the MANUAL mode where the gamepad controls the ROV or the AUTOMATIC mode where depth, heading and velocity pwm computed by the controllers drive the ROV if there are enable to be published.
Enable controllers
First you need to enable AUTOMATIC mode.
Then to enable controllers to control the ROV, you have to send a Set_[depth/heading/velocity] message with the parameter enable_[depth/heading/velocity]_ctrl to True. Otherwise, the ROV remains uncontrolled by [depth/heading/velocity] controllers.
Last updated
Was this helpful?