Skip to content

Tutorials

NRottmann edited this page May 13, 2020 · 8 revisions

In this section, we will introduce the main functionalities of ROS-Mobile using a simulated differential drive robot.

Requirements:

  • A computer with Ubuntu 18.04 and ROS Melodic (can be also run onto a virtual machine)
  • A mobile device with Android as OS
  • A network connection between the computer and the mobile device
  • Internet connection

Preparations:

  • Install ROS-Mobile onto your mobile device. Instructions can be found here.
  • Download the simulation environment by following the instructions from here. You might need to add additional ROS packages listed here.
  • Make sure both, your computer and your mobile device, are connected via the same network.

Control the differential drive robot with the joystick node

  • Check the IP-Adress of your computer using
ifconfig
  • Open a terminal, set the ROS_Hostname correctly and start the simulation environment
export ROS_HOSTNAME=your_ip
cd ~/tutorial_ws
source devel/setup.bash
roslaunch simulation_environment apartment.launch
  • Connect to the running ROS master by inserting the computers IP-Address in the Master Tab and pushing the connect button. If the button turns into a disconnet button, you are connected!
  • Change to the Details Tab and hit the plus sign to add a joystick node. A list with details, including the Vis location, should appear. Here we can define the location and width of ourr joystick in the Viz Tab as well as the projection to the Twist message. Define the size and location of the joystick such that it suits you (e.g. x=0, y=0, width=6, height=6) and set the projection of the x-axis to (angular,z) and the projection of the y-axis to (linear,x). Make sure that the topic name for the publisher is cmd_vel.
  • Change to the Viz Tab. By moving the joystick around you send messages via the cmd_vel topic to the ROS system. The differential drive robot will react.
Clone this wiki locally