Getting started [OUT OF DATE] - robotique-udes/rover_udes GitHub Wiki

Requirements

Environement

  • Ubuntu 18.04 (Dual booting is recommended over using a virtual machine because the simulation can use a lot of ressources.)
  • ROS melodic (Installation instructions)
  • Set up a ROS workspace in your home directory by following this tutorial. It will be assumed that the workspace is named catkin_ws for the rest of this guide.

Software

  • First you'll need to clone RobotiqueUdeS' rover repositories in ~/catkin_ws/src/. At a minimum you need to clone rover_control, rover_drivers, rover_base, rover_udes and rover_mini.
  • Build the code by opening a terminal in the root of catkin_ws and running catkin_make
  • Docker: follow this tutorial, starting at "Install using the repository"

ROS dependency packages

Most dependencies can be installed by opening a terminal in the root of your catkin_ws and executing the following commands:

sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -r -y

If you've already used rosdep before on your computer, you only need to execute the last line. This will scan all package.xml files in every ROS package in your catkin_ws and automatically download the dependencies. You'll know if a dependency wasn't downloaded if you get an error message telling you a node or package could not be found.###

If that is the case, you can manually download it like this: sudo apt install ros-melodic-<package-name>. Note that it must all be dashes and not underscores. You can find a list of dependencies here

Setting up a controler or joystick for teleoperation of the robot

Follow this tutorial and in rover_control/launch/teleop_joystick.launch make sure the device name is correct. If you only have one device connected, the controller or joystick's name should be js0

Setting up Google maps satelite images for Mapviz

Mapviz is a 2D top-down program that allows you to visualise the robot in it's environment along with sensor data. It is possible to incorporate Google maps satelite images instead of the default drawn map.

Note: An internet connection is required to download the images but once they are downloaded, they are cached and can be used offline.

Setting up and running mapproxy server

Follow instructions of section 1 only. https://github.com/danielsnider/MapViz-Tile-Map-Google-Maps-Satellite

Automate startup of the mapproxy server at boot:

  1. Open a terminal and type sudo crontab -e
  2. Choose any text editor
  3. Add this line after the comments: @reboot sudo docker run -p 8080:8080 -d -t -v ~/mapproxy:/mapproxy danielsnider/mapproxy

Base url for the tile map plugin (if it's not in mapviz already for some reason): http://localhost:8080/wmts/gm_layer/gm_grid/{level}/{x}/{y}.png

Launching the simulation

Simulation with visualization and teleoperation only

The robot can be simulated using Gazebo, which have automatically been installed along with ROS. There are multiple launch files for Gazebo simulations using different worlds. You can see the list here. All launch files starting with rover can be launched.

  1. Launch the simulation with roslaunch rover_gazebo rover_playpen.launch
  2. You can visualize the robot in RVIZ with roslaunch rover_viz view_robot.launch or in Mapviz with roslaunch rover_viz mapviz.launch
  3. To teleoperate the robot, you can use either a joystick/gamepad or the keyboard. roslaunch rover_control teleop_joystick.launch or roslaunch rover_control teleop_keyboard.launch You should now be able to move the robot around and see the sensor data in RVIZ.

Simulation with path planning

  1. Follow the instructions from the previous section (teleoperation is optional).
  2. Launch move_base roslaunch rover_nav move_base.launch In the top of RVIZ, click on the button labeled "2D Nav Goal" and click and drag anywhere on the map to give a goal pose. Note that the fixed frame must be "map" for this to work. It can be changed in the top of the left pannel. The robot should now move on it's own. You should alse be able to see the costmap displayed.