Hovering

The following command will start the simulation:

$ roslaunch rotors_gazebo mav_hovering_example.launch  

In the following screenshot we can see the hex-rotor helicopter taking off after 5 seconds, and flying to the point P = (0,0,1):

Hovering

In addition, the following diagram shows the ROS communication network, which gives an overview of all the ROS nodes that are running, and the topics on which the nodes are communicating:

Hovering – ROS communication network

Although, in the preceding screenshot, Gazebo is only shown as one ROS node, internally all the Gazebo plugins are running, such as IMU and individual motors that are mounted on the frame. For example, a generic odometry sensor is mounted on the Firefly, which publishes the odometry messages in the /firefly/odometry_sensor1 namespace, as shown in the following listing:

Firefly message topics

The odometry message includes the position, orientation, and the linear and angular velocity of the MAV. Hence, the position controller can directly subscribe to the odometry message. Furthermore, the controller publishes actuator messages, which are read by the Gazebo controller interface and forwarded to the individual motor model plugins.

The controller get the commands from MultiDOFJointTrajectory messages, which are published by the hovering_example node. These messages contain references of poses and its derivatives, however, in this example only the position and the values of the messages are set. Even if the MultiDOFJointTrajectory messages are compatible with planners, such as MoveIt! But, waypoints can also be published as PoseStamped messages in some cases.

We can change the position reference of the MAV by sending a MultiDOFJointTrajectory message using a planner or waypoint_publisher. For example, the following command will move the Firefly to the given pose (x, y, z, yaw):

$ rosrun rotors_gazebo waypoint_publisher 5 0 1 0 __ns:=firefly  

The output can be seen in the following screenshot:

Movement for Firefly

In addition, we can exchange the vehicle by setting the mav_name argument as illustrated in the following command:

$ roslaunch rotors_gazebo mav_hovering_example.launch mav_name:=pelican

The output can be seen in the following screenshot:

Pelican

In current RotorS packages, asymmetric_quadrotor, firefly, hummingbird, and pelican MAVs are available:

  • All the control parameters  are set in lee_controller_<mav_name>.yaml, and the vehicle parameters used by the controller in <mav_name>.yaml, which are not identical
  • On real systems, the vehicle parameters are usually unknown, and only approximate values can be estimated
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.133.228