AutoRef honors 2019: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:


=software architecture=
=software architecture=
Since hardware testing is not an option anymore during times like these we had to adapt how we execute the project. Since we still want to be able to use the work done in these times, we chose to build the communication of our system on the Robot Operating System (ROS). This way we can keep many components of our system unchanged when we go back and implement it with real hardware. Only the part that models the quadcopter and the video stream of the camera have to be swapped for the real drone and camera.
Since hardware testing is not an option anymore during times like these we had to adapt how we execute the project. Since we still want to be able to use the work done in these times, we chose to build the communication of our system on the Robot Operating System (ROS). This way we can keep many components of our system unchanged when we go back and implement it with real hardware. Only the part that models the quadcopter and the video stream of the camera have to be swapped for the real drone and camera.
 
The simulation environment chosen is CoppeliaSim (also known as V-rep), this environment has a nice intuitive user interface and works great with ROS. In CoppeliaSim each object (i.e. a drone, or a camera) can have its own (child) script which can communicate with ROS via subscription and publication to topics. The overall architecture can be displayed by the ROS command 'rqt_graph'' while the system is running. The output of this command will be displayed in the following figure.
[[File:Rqt drone follow.jpg|750 px|system]]
The following text will briefly explain what everything in the figure means. More in-depth information will come later or can be seen in the topics own section.
The sim_ros_interface is the node which is created by the simulator itself and serves as a communication path between the simulator scripts and the rest of the system. It will publish camera footage from the camera mounted on the drone to the topic /txCam. The ''image_processor'' node will subscribe to /txCam and will subsequently get the image from the simulator. It will then extract the relative ball position and size (in pixels) out of each frame and stores it in an object (message type). This message will then be published to the /ballPos topic. The simulator node will subscribe to this topic, get the position of the ball relative to the drone and decide what to do with this information i.e. move in an appropriate manner. This loop will run at approximately 24Hz.




Line 31: Line 36:
The simulation environment chosen for this project was CoppeliaSim (also known as V-rep). This environment was chosen because of its intuitive API and the ability of its internal object scripts, more information about how CoppeliaSim deals with scripts can be found here https://www.coppeliarobotics.com/helpFiles/en/scripts.htm. It should be noted that the reader should also be familiar with the beginner concepts of the Robot Operating System (ROS). If unfamiliar with ROS, skills can be obtained by following tutorials found on there site: http://wiki.ros.org/ROS/Tutorials. The next figure gives a sense of what is achieved after this tutorial.
The simulation environment chosen for this project was CoppeliaSim (also known as V-rep). This environment was chosen because of its intuitive API and the ability of its internal object scripts, more information about how CoppeliaSim deals with scripts can be found here https://www.coppeliarobotics.com/helpFiles/en/scripts.htm. It should be noted that the reader should also be familiar with the beginner concepts of the Robot Operating System (ROS). If unfamiliar with ROS, skills can be obtained by following tutorials found on there site: http://wiki.ros.org/ROS/Tutorials. The next figure gives a sense of what is achieved after this tutorial.
[[File:Simulator inaction honors.jpg|500 px]]
[[File:Simulator inaction honors.jpg|500 px]]
*software architecture
Using the ROS command ''rqt_graph'' the high-level system can be depicted as a few topics and nodes connected by messages, this can be seen in the following figure. [[File:Rqt drone follow.jpg|750 px|system]]
The following text will briefly explain what everything in the figure means. More in-depth information will come later. The sim_ros_interface is the node which is created by the simulator itself and serves as a communication path between the simulator scripts and the rest of the system. It will publish camera footage from the camera mounted on the drone to the topic /txCam. The ''image_processor'' node will subscribe to /txCam and will subsequently get the image from the simulator. It will then extract the relative ball position and size (in pixels) out of each frame and stores it in an object (message type). This message will then be published to the /ballPos topic. The simulator node will subscribe to this topic, get the position of the ball relative to the drone and decide what to do with this information i.e. move in an appropriate manner. This loop will run at approximately 24Hz.

Revision as of 14:21, 6 May 2020



AutoRef Honors 2019/20

Introduction

  • explain intentions
  • since we cannot test hardware anymore we had to adapt and switch to simulation


software architecture

Since hardware testing is not an option anymore during times like these we had to adapt how we execute the project. Since we still want to be able to use the work done in these times, we chose to build the communication of our system on the Robot Operating System (ROS). This way we can keep many components of our system unchanged when we go back and implement it with real hardware. Only the part that models the quadcopter and the video stream of the camera have to be swapped for the real drone and camera.

The simulation environment chosen is CoppeliaSim (also known as V-rep), this environment has a nice intuitive user interface and works great with ROS. In CoppeliaSim each object (i.e. a drone, or a camera) can have its own (child) script which can communicate with ROS via subscription and publication to topics. The overall architecture can be displayed by the ROS command 'rqt_graph while the system is running. The output of this command will be displayed in the following figure. system The following text will briefly explain what everything in the figure means. More in-depth information will come later or can be seen in the topics own section. The sim_ros_interface is the node which is created by the simulator itself and serves as a communication path between the simulator scripts and the rest of the system. It will publish camera footage from the camera mounted on the drone to the topic /txCam. The image_processor node will subscribe to /txCam and will subsequently get the image from the simulator. It will then extract the relative ball position and size (in pixels) out of each frame and stores it in an object (message type). This message will then be published to the /ballPos topic. The simulator node will subscribe to this topic, get the position of the ball relative to the drone and decide what to do with this information i.e. move in an appropriate manner. This loop will run at approximately 24Hz.



Vision

info about vision goes here

hardware

cf bolt flowdeck

Tutorial Simulation

After following this tutorial the reader should be able to run a basic simulation of a drone following a yellow object (ball) on a soccer field. The simulation environment chosen for this project was CoppeliaSim (also known as V-rep). This environment was chosen because of its intuitive API and the ability of its internal object scripts, more information about how CoppeliaSim deals with scripts can be found here https://www.coppeliarobotics.com/helpFiles/en/scripts.htm. It should be noted that the reader should also be familiar with the beginner concepts of the Robot Operating System (ROS). If unfamiliar with ROS, skills can be obtained by following tutorials found on there site: http://wiki.ros.org/ROS/Tutorials. The next figure gives a sense of what is achieved after this tutorial. Simulator inaction honors.jpg