/sim_gazebo_bringup

Generic Gazebo simulation bringup from JSON

Primary LanguagePythonOtherNOASSERTION

Introduction to Gazebo

WHY GAZEBO?


Gazebo is a full-fledged simulation environment that is compatible with PX4. In 2021, NXP Cup contestants may use the Gazebo simulation for an extra challenge at home. The benefit to using the Gazebo simulation environment is that you can test your code without crashing or damaging your actual NXP Cup car. The code modules that you run on your actual NXP Cup car can be ported to the Gazebo simulation environment with ease - and if you're using a brushless Cup car, you'll essentially be running the same exact code.

Installing ROS2

Setting up SSH keys

To use Gazebo, you will need to have a GitHub account. The installation scripts require a GitHub account with an SSH key.

To create an SSH key, run the following in a terminal:

  • ssh-keygen
  • sudo apt install xclip git
  • xclip -sel clip < ~/.ssh/id_rsa.pub
  • Adding your SSH key to GitHub

    Next, you'll want to install xclip. This program will allow you to copy the contents of the id_rsa.pub file to your clipboard so you can paste it into GitHub. To install xclip, run the following command: 
 $ sudo apt install xclip git Once you've installed xclip, you need to copy the id_rsa.pub file to your clipboard. To do so, run the following command: $ xclip -sel clip < ~/.ssh/id_rsa.pub Adding your SSH key to GitHub Now, log into your GitHub account and paste your SSH key. The SSH key field is located in your account settings under "SSH and GPG keys". Add a new SSH key by pressing "New SSH key" and pasting your SSH key in the box. Make sure to give it a name!

    You need to download this file inorder to install the ROS

    Click here to download
    RUN THE FOLLOWING COMMANDS
    • cd ~/Downloads
    • chmod a+x foxy_install_aim.sh
    • ./foxy_install_aim.sh
    • source ~/.bashrc

    Installing Robocon Gazebo

    • cd ~
    • mkdir -p robocon_ws/src && cd robocon_ws/src
    • git clone https://github.com/harshag37/sim_gazebo_bringup.git
    • cd ~/robocon_ws
    • colcon build --packages-select sim_gazebo_bringup --symlink-install
    • echo "source /home/$USER/robocon_ws/install/setup.bash" >> ~/.bashrc
    • source ~/.bashrc
    • ros2 launch sim_gazebo_bringup sim_gazebo.launch.py