Hello dear community.
I am facing an issue and I hope you guys can help me.
-Pixhawk with PX4 firmware
-ZED mini camera
Auterion company provides a ROS launch that bridge mavlink and mavros for T265 camera frame.
I have been using the T265 to do offboard control but the camera is broken so I have to change to the ZED mini. Using the T265 the camera was publishing to
/mavros/odometry/out and /mavros/compannion_process/status
There is no too much info about using ZED mini with PX4 so I have implement a code base on one research paper. This code subscribe from
zedm/zed_node/odom and publish under
I have two general questions
What is the difference between
How the transformations are handle with zed since the zed camera is located 10 cm in front of the pixhawk? or how the NED and ENU will be converted?
Thank you so much
Here is my code
import rospy import mavros from nav_msgs.msg import Odometry from geometry_msgs.msg import PoseStamped from geometry_msgs.msg import PoseWithCovarianceStamped mavros.set_namespace() def zed_convertion(msg): pose = PoseStamped() pose_cov = PoseWithCovarianceStamped() # Pose with covariance pose_cov.header = msg.header pose_cov.pose = msg.pose # Pose without covariance pose.header = msg.header pose.pose = msg.pose.pose rospy.loginfo(pose) pose_pub.publish(pose) pose_cov_pub.publish(pose_cov) def main_converter(): rospy.init_node('zed_pose_converter', anonymous=True) rospy.Subscriber("/zedm/zed_node/odom", Odometry, zed_convertion) rate = rospy.Rate(10) # 10hz while not rospy.is_shutdown(): rate.sleep() if __name__ == '__main__': try: pose_pub = rospy.Publisher('/mavros/vision_pose/pose', PoseStamped, queue_size=10) pose_cov_pub = rospy.Publisher('/mavros/vision_pose/pose_cov', PoseWithCovarianceStamped, queue_size=10) main_converter() except rospy.ROSInterruptException: pass