Mavros with Gazebo and RVIZ

asked 2020-02-24 18:21:04 -0500

Dallas_doublewide gravatar image

I am an EE major, so please be kind to me, I am new to both ROS and linux but I am trying my best to learn as fast as I can.

Background: For my senior design project, my team is working with the USAF to build an autonomous ground vehicle. We have already built the UGV and it works, but this semester we need to get ROS working. The UGV needs to be able to traverse GPS waypoints to complete a mission without colliding with people or other obstacles. (will use CV and Lidar to do the avoidance) We have a URDF file and are running a simple sim in gazebo. There is a team member working on communication between ROS and the motor drivers so all of that is a non-issue

Question: Currently my task is getting GPS and other sensor data from a Pixhawk 2.1 for the system via mavros. I've succeeded in doing that, but my next issue is getting Gazebo and or RVIZ to reflect the position and translation data from the IMU. Q1: What is the best way for me to get Gazebo to work with mavros such that if I rotate the pixhawk, the model in the sim will rotate.

Q2: How can I get the data visualized in RVIZ?

Q3: Do you have any advice for our team regarding the project?

Q4: Is there a way for me to feed dummy data?--Such that the team can test the navigation packages without actually having to move anything to the GPS waypoints.

Q5: Is there anything else cool I can do with Mavros?

Please be kind, I am extremely new to all of this, I am an EE major so I never expected to have to get into the software side of things, but it kinda just turned out this way so I am doing what I can.

edit retag flag offensive close merge delete

Comments

Hi @Dallas_doublewide,

Question: You can use the plugins provided with hector_gazebo_plugins to add a GPS and IMU sensor to the URDF description of your robot. Q2: Rviz provides several displays for what you want to achieve. You can use the Odometry display type for GPS and IMU display type for IMU data; you can find it in rviz_plugin_tutorials package. Q3: I am sure this set up will not be sufficient to follow GPS waypoints, you will need precise localization and probably a fusion of odometries. I would set up first a RTK correction for the GPS and a kalman filter to fuse IMU, GPS and robot odometry since in the real platform you will have problems with orientation. Q4: Why not use rosbags? With it you will be able to record data and save it for a future usage without the need of moving the robot. Q4: It depends on ...(more)

Weasfas gravatar image Weasfas  ( 2020-02-26 08:19:04 -0500 )edit