-
Notifications
You must be signed in to change notification settings - Fork 84
Description
I am attempting to control an ROV with mavROS. I have Ardusub code running on a Pixhawk 4. On the topside I am running mavROS to facilitate camera input amongst other sensor streams and provide the ROS specific implementation of Mavlink. I am publishing messages to mavROS topics using an XBox controller.
My startup command in terminal is:
'roslaunch bluerov_ros_playground user_mav.launch'
I am getting perfect control of my 8 existing ROV thrusters using the 2 joysticks on the XBox controller. What I would like to do is add 2 more thrusters that only need stepwise speed control via 2 buttons on the controller (RB and RT). The commands would simply be step up speed in a clockwise direction on both thrusters or step up speed in the anticlockwise direction on both thrusters.
In 'src/bluerov/user.py', the commands for the 8 existing thrusters are sent to the Pixhawk via the ROS topic 'RCOverrideIn'. This data array for this topic is full however. How do I create an equivalent topic on which to publish the commands for my additional 2 thrusters?
I have tried adding in code like:
if buttons[5] == 1: # Both Additional Motors Speed Up Clockwise
thrust = [0.5] # THIS IS AN ARBITRARY VALUE BETWEEN 0 and 1 for now
self.pub.set_data('/mavros/setpoint_attitude/thrust', thrust)
but I am not sure if the Thrust topic is the ideal one to be using.
Any help much appreciated! Also I am new to ROS, apologies for the noob questions in advance.