Avatar Prakarsh is currently a senior at Ajay Kumar Garg Engineering College, pursuing Electronics and Instrumentation Engineering as his major. His research interests include Reinforcement Learning, Deep Learning, Autonomous Systems, and Embodied AI.

Week 3-new ex prototype Test

Week 3

  • In the previous meeting I discussed with the mentors that whether the improvement in the performance is satisfiable enough to move ahead with more testing and received a green flag. The results are in this post and the new exercise prototype testing in this week’s post.*

How did I contributed in this week?

Follow turtlebot was a green flag for further testing and developing more prototypes. Drone cat and mouse exercise was integrated with rotorS sim. Down below are the details:

  • For prototyping drone cant and mouse exercise with rotors launch file was modified for launching two crazyfile2 drones with their respective position controller nodes

  • Here’s the main update in the launch file for follow_turtlebot:

<group ns="$(arg mav_name)_1">
  <!-- CRAZYFLIE_1 -->
    <include file="$(find rotors_gazebo)/launch/spawn_mav_crazyflie.launch">
      <arg name="mav_name" value="$(arg mav_name)" />
      <arg name="namespace" value="$(arg mav_name)_1" />
      <arg name="model" value="$(find rotors_description)/urdf/mav_generic_odometry_sensor.gazebo" />
      <arg name="enable_logging" value="$(arg enable_logging)" />
      <arg name="enable_ground_truth" value="$(arg enable_ground_truth)" />
      <!-- As for the Mellinger and Position controllers in the "crazyflie2_hovering_example.launch" file -->
      <arg name="enable_internal_model_controller" value="$(arg enable_internal_model_controller)" />
      <arg name="log_file" value="$(arg mav_name)_1"/>
      <!-- Set the initial position -->
      <arg name="x" value="-0.5"/>
      <arg name="y" value="-0.5"/>
    </include>
   <!-- The Crazyflie position controller -->
   <node name="position_controller_node" pkg="rotors_control" type="position_controller_node" output="screen">
      <!-- Enabling internal model controller-->
      <param name="enable_internal_model_controller" value="$(arg enable_internal_model_controller)"  />
      <!-- Crazyflie file parameters used within the Internal Model Controller controller -->
      <rosparam command="load" file="$(find rotors_gazebo)/resource/crazyflie_parameters.yaml" />
      <rosparam command="load" file="$(find rotors_gazebo)/resource/$(arg mav_name).yaml" />
      <!-- Loading Internal Model Controller's parameters -->
      <rosparam command="load" file="$(find rotors_gazebo)/resource/crazyflie_internal_model_controller.yaml" />
   </node>
   <!-- Enable/Disable the trajectory generator - If the position_controller is activated, the hovering_example will be executed,
        otherwise the spline generator and the Mellinger's controller will be run-->
   <node name="hovering_example_spline_swarm" pkg="rotors_gazebo" type="hovering_example_spline_swarm" output="screen" >
     <rosparam command="load" file="$(find rotors_gazebo)/resource/spline_trajectory.yaml" />
   </node>
   <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
   <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
  </group>

  <!-- CRAZYFLIE_2 -->
  <group ns="$(arg mav_name)_2">
    <include file="$(find rotors_gazebo)/launch/spawn_mav_crazyflie.launch">
      <arg name="mav_name" value="$(arg mav_name)" />
      <arg name="namespace" value="$(arg mav_name)_2" />
      <arg name="model" value="$(find rotors_description)/urdf/mav_generic_odometry_sensor.gazebo" />
      <arg name="enable_logging" value="$(arg enable_logging)" />
      <arg name="enable_ground_truth" value="$(arg enable_ground_truth)" />
      <!-- As for the Mellinger and Position controllers in the "crazyflie2_hovering_example.launch" file -->
      <arg name="enable_internal_model_controller" value="$(arg enable_internal_model_controller)" />
      <arg name="log_file" value="$(arg mav_name)_2"/>
      <!-- Set the initial position -->
      <arg name="x" value="-1.0"/>
      <arg name="y" value="-0.5"/>
    </include>
   <!-- The Crazyflie position controller -->
   <node name="position_controller_node" pkg="rotors_control" type="position_controller_node" output="screen">
      <!-- Enabling internal model controller-->
      <param name="enable_internal_model_controller" value="$(arg enable_internal_model_controller)"  />
      <!-- Crazyflie file parameters used within the Internal Model Controller controller -->
      <rosparam command="load" file="$(find rotors_gazebo)/resource/crazyflie_parameters.yaml" />
      <rosparam command="load" file="$(find rotors_gazebo)/resource/$(arg mav_name).yaml" />
      <!-- Loading Internal Model Controller's parameters -->
      <rosparam command="load" file="$(find rotors_gazebo)/resource/crazyflie_internal_model_controller.yaml" />
   </node>
   <!-- Enable/Disable the trajectory generator - If the position_controller is activated, the hovering_example will be executed,
        otherwise the spline generator and the Mellinger's controller will be run-->
   <node name="hovering_example_spline_swarm" pkg="rotors_gazebo" type="hovering_example_spline_swarm" output="screen" >
     <rosparam command="load" file="$(find rotors_gazebo)/resource/spline_trajectory.yaml" />
   </node>
   <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
   <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
  </group>
  • The changes in Robotics Academy repo were made and pushed on separate branch on forked repo

  • For performance comparison within the docker container Docker Monitoring was done using cAdvisor Prometheus & Grafana. Here are the results:

drone_cat_and_mouse with PX4(current) px4

drone_cat_and_mouse with Rotors(prototype) px4

  • Conclusion:

*So, as seen in the video the amount of memory usage as well as the total cores consumed by the docker container varies.

The total cores usage in PX4 (current) case stabilises at almost 5.0 to 5.75 as seen but in the case of rotors prototype the usage is at 3.5 to 4.0 while running simulation in browser as well opened console with code running.

And as for the total memory usage, in the case of PX4 (current) it’s at stable 1860 Megabytes (almost) and in the case of rotors prototype, it’s at 1455 Megabytes while running simulation in browser as well opened console with code running.