def __init__(self): super(GazeboTeleop, self).__init__() self.sub = subs.Subs() self.pub = pubs.Pubs() self.pub1 = pubs.Pubs() self.sub1 = subs.Subs() self.pub.subscribe_topic('/BlueRov2/thruster_command', JointState) self.pub1.subscribe_topic('/gazebo/current',Vector3) self.sub.subscribe_topic('/BlueRov2/state', Odometry)
def __init__(self): super(ROV_control, self).__init__() # Do what is necessary to start the process # and to leave gloriously self.arm() self.sub = subs.Subs() self.pub = pubs.Pubs() self.pub.subscribe_topic('/mavros/rc/override', OverrideRCIn) self.pub.subscribe_topic('/mavros/setpoint_velocity/cmd_vel', TwistStamped) self.pub.subscribe_topic('/BlueRov2/body_command', JointState) self.sub.subscribe_topic('/joy', Joy) self.sub.subscribe_topic('/mavros/battery', BatteryState) self.sub.subscribe_topic('/mavros/rc/in', RCIn) self.sub.subscribe_topic('/mavros/rc/out', RCOut) self.cam = None try: video_udp_port = rospy.get_param("/user_node/video_udp_port") rospy.loginfo("video_udp_port: {}".format(video_udp_port)) self.cam = video.Video(video_udp_port) except Exception as error: rospy.loginfo(error) self.cam = video.Video()
def __init__(self): super(Code, self).__init__() # Do what is necessary to start the process # and to leave gloriously rospy.wait_for_service('/mavros/cmd/arming') self.arm_service = rospy.ServiceProxy('/mavros/cmd/arming', CommandBool) self.disarm() self.is_armed = False self.sub = subs.Subs() self.pub = pubs.Pubs() self.pub.subscribe_topic('/mavros/rc/override', OverrideRCIn) self.pub.subscribe_topic('/mavros/setpoint_velocity/cmd_vel', TwistStamped) self.pub.subscribe_topic('/BlueRov2/body_command', JointState) self.sub.subscribe_topic('/joy', Joy) self.sub.subscribe_topic('/mavros/battery', BatteryState) self.sub.subscribe_topic('/mavros/rc/in', RCIn) self.sub.subscribe_topic('/mavros/rc/out', RCOut) self.sub.subscribe_topic('/imu_pose', Pose) self.cam = None self.bridge = CvBridge() self.image_pub = rospy.Publisher("BlueRov2/image",Image) try: video_udp_port = rospy.get_param("/user_node/video_udp_port") rospy.loginfo("video_udp_port: {}".format(video_udp_port)) self.cam = video.Video(video_udp_port) except Exception as error: rospy.loginfo(error) self.cam = video.Video()
def __init__(self): super(Code1, self).__init__() # Do what is necessary to start the process # and to leave gloriously self.arm() self.sub = subs.Subs() self.pub = pubs.Pubs() self.pub.subscribe_topic('/act', Custom) self.pub.subscribe_topic('/mavros/rc/override', OverrideRCIn) self.pub.subscribe_topic('/mavros/setpoint_velocity/cmd_vel', TwistStamped) self.pub.subscribe_topic('/BlueRov2/body_command', JointState) self.pub.subscribe_topic('/Location2', Odometry) self.sub.subscribe_topic('/joy', Joy) self.sub.subscribe_topic('/odom', Odometry) self.sub.subscribe_topic('/mavros/battery', BatteryState) self.sub.subscribe_topic('/mavros/rc/in', RCIn) self.sub.subscribe_topic('/mavros/rc/out', RCOut) self.sub.subscribe_topic('/mavros/imu/static_pressure', FluidPressure) self.sub.subscribe_topic('/mavros/imu/diff_pressure', FluidPressure) self.sub.subscribe_topic('/mavros/imu/data', Imu) self.sub.subscribe_topic('/depth', Float32) self.sub.subscribe_topic('/odometry/filtered', Odometry) self.cam = None try: video_udp_port = rospy.get_param("/user_node/video_udp_port") rospy.loginfo("video_udp_port: {}".format(video_udp_port)) self.cam = video.Video(video_udp_port) except Exception as error: rospy.loginfo(error) self.cam = video.Video()
def __init__(self): super(Code, self).__init__() # Do what is necessary to start the process # and to leave gloriously self.arm() self.sub = subs.Subs() self.pub = pubs.Pubs() self.pub.subscribe_topic('/mavros/rc/override', OverrideRCIn) self.pub.subscribe_topic('/mavros/setpoint_velocity/cmd_vel', TwistStamped) # Thrusters Input #self.pub.subscribe_topic('/bluerov2/thrusters/0/input', FloatStamped) #self.pub.subscribe_topic('/bluerov2/thrusters/1/input', FloatStamped) #self.pub.subscribe_topic('/bluerov2/thrusters/2/input', FloatStamped) #self.pub.subscribe_topic('/bluerov2/thrusters/3/input', FloatStamped) #self.pub.subscribe_topic('/bluerov2/thrusters/4/input', FloatStamped) #self.pub.subscribe_topic('/bluerov2/thrusters/5/input', FloatStamped) self.sub.subscribe_topic('/joy', Joy) self.sub.subscribe_topic('/mavros/battery', BatteryState) self.sub.subscribe_topic('/mavros/rc/in', RCIn) self.sub.subscribe_topic('/mavros/rc/out', RCOut)
def __init__(self): super(SITL, self).__init__() self.arm() self.sub = subs.Subs() self.pub = pubs.Pubs() self.sub.subscribe_topic('/mavros/local_position/pose', PoseStamped) self.pub.subscribe_topic('/gazebo/set_model_state', ModelState)
def __init__(self): super(GazeboTeleop, self).__init__() self.sub = subs.Subs() self.pub = pubs.Pubs() self.pub.subscribe_topic('/BlueRov2/thruster_command', JointState) self.sub.subscribe_topic('/BlueRov2/state', Odometry) self.sub.subscribe_topic('/joy', Joy)
def __init__(self): super(Control, self).__init__() # Do what is necessary to start the process # and to leave gloriously self.sub = subs.Subs() self.pub = pubs.Pubs() self.sub.subscribe_topic('/actuation', Custom) self.sub.subscribe_topic('/act', Custom) self.sub.subscribe_topic('/joy', Joy) self.pub.subscribe_topic('/mavros/rc/override', OverrideRCIn)