<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gonzalo Mier</title>
    <description>The latest articles on DEV Community by Gonzalo Mier (@gonzalomier).</description>
    <link>https://dev.to/gonzalomier</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F877459%2F7164f6d1-02ec-4c52-8729-1c9774875261.png</url>
      <title>DEV Community: Gonzalo Mier</title>
      <link>https://dev.to/gonzalomier</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gonzalomier"/>
    <language>en</language>
    <item>
      <title>How to Install Fields2Cover on Linux for Coverage Path Planning on Agriculture</title>
      <dc:creator>Gonzalo Mier</dc:creator>
      <pubDate>Tue, 06 Dec 2022 12:33:04 +0000</pubDate>
      <link>https://dev.to/gonzalomier/how-to-install-fields2cover-on-linux-for-coverage-path-planning-on-agriculture-3dc0</link>
      <guid>https://dev.to/gonzalomier/how-to-install-fields2cover-on-linux-for-coverage-path-planning-on-agriculture-3dc0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8feimhmsvit4034cr0ok.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8feimhmsvit4034cr0ok.jpeg" alt="Fields2Cover logo" width="800" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Installing Fields2Cover (&lt;a href="https://github.com/Fields2Cover/Fields2Cover" rel="noopener noreferrer"&gt;https://github.com/Fields2Cover/Fields2Cover&lt;/a&gt;) on your Linux system is a fantastic way to improve the efficiency and productivity of your agricultural operations!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2zni971nn93u5drmbt90.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2zni971nn93u5drmbt90.png" alt="Screenshot of a path generated with Fields2Cover and ROS" width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fields2Cover is a state-of-the-art coverage path planning library that is perfect for precision agriculture. With Fields2Cover, you can easily determine the optimal paths for your agricultural machinery to follow in order to cover a field while minimizing overlap and maximizing coverage. This will help you to save resources such as fuel and water, and it will also increase your yields and reduce your costs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;To get started with Fields2Cover, you will first need to have some packages installed on your system. You can do this by using the following commands in a terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get -y update
sudo apt-get install -y --no-install-recommends software-properties-common
sudo add-apt-repository -y ppa:ubuntugis/ppa
sudo apt-get -y update
sudo apt-get install -y --no-install-recommends build-essential ca-certificates cmake \
     doxygen g++ git libeigen3-dev libgdal-dev libpython3-dev python3 python3-pip \
     python3-matplotlib python3-tk lcov libgtest-dev libtbb-dev swig
python3 -m pip install gcovr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installing C++ Fields2Cover library
&lt;/h2&gt;

&lt;p&gt;After installing the necessary packages, you can clone the Fields2Cover repository and compile it using the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/Fields2Cover/Fields2Cover
cd Fields2Cover
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)
sudo make install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once Fields2Cover is installed, you can use it in your own projects by adding the following lines to your CMakeLists.txt file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find_package(Fields2Cover REQUIRED)
target_link_libraries(&amp;lt;&amp;lt;&amp;lt;your_package&amp;gt;&amp;gt;&amp;gt; Fields2Cover)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installing Fields2Cover with Python interface
&lt;/h2&gt;

&lt;p&gt;In addition to the C++ interface, Fields2Cover also provides a python interface that you can use in your python scripts. To use the python interface, you will need to install some additional packages and compile the project with the python interface enabled. You can do this by using the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install swig python3-pytest
cd build
cmake -DBUILD_PYTHON=ON ..
make -j$(nproc)
sudo make install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To test if the python interface was successfully compiled and installed, you can run the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python3
import fields2cover
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If no errors are thrown, the python interface was successfully installed. You can also run the test suite by running the following command from the main Fields2Cover directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pytest-3 tests/python/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Adding ROS support
&lt;/h2&gt;

&lt;p&gt;Fields2Cover also provides a ROS interface that allows you to visualize your fields and the paths generated by the algorithm. To use the ROS interface, you will need to clone the Fields2Cover and fields2cover_ros repositories and build them with ROS. To do so, you can use the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd catkin_ws/
git clone https://github.com/Fields2Cover/fields2cover_ros src/fields2cover_ros
rosdep install -r --ignore-src -y --from-paths .
catkin_make_isolated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the ROS interface is built, you should be able to use Fields2Cover in your ROS projects and enjoy the benefits of precision agriculture! With Fields2Cover, you can easily determine the optimal paths for your agricultural machinery to follow, which will save you resources and increase your yields. So why not give Fields2Cover a try today and take your agricultural operations to the next level?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>softwaredevelopment</category>
      <category>productivity</category>
      <category>career</category>
    </item>
  </channel>
</rss>
