Little John Tutorials

From Macro Wiki
Jump to: navigation, search

Here you have some tutorials on how to run a simulation of the Little John robot using Rviz, the steps you need to use the physical robot, and a documentation of the classes we have in C++.

How to use Rviz to simulate Little John

Before to run Rviz, make sure you have already installed and setup ROS, as well the needed libraries, besides DQRobotics and the Little John's repository. For more information, see the ROS Tutorial.

Using a script

Today, in order to simulate the Little John using Rviz as a viewer, it is necessary to use two terminals: one to initialize Rviz and another one to starts the control of the robot. To avoid multiples terminals, you can use the Python script located in the Little John's repository:


This script opens the Rviz and then execute the desired control. To run it, do



   ./<PATH/> --control <YOUR CONTROLLER NAME>


   ./ -c wholeBodyControl

If you run the script without the '-c/--control', it will only open the Rviz with the Little John, but it will not perform any control action.

You can also use the '-h/--help' option in order to show the help of this script.


If you do not want to use the script described previously and prefer to run the command manually, you can follow the following steps:

1 - run 'roslaunch littlejohn_description littlejohn_simulator.launch';

2 - wait for Rviz to show the Little John in its window;

3 - from another terminal, run 'rosrun littlejohn_control <YOUR CONTROLLER>'.

Steps to use the physical Little John

In order to use Little John, one needs first to initialize the vision system that is responsible for obtaining the robot's pose. To do so, follow this steps:

1- run 'roslaunch markers markers_odometry.launch';

2- run 'rosrun rqt_reconfigure rqt_reconfigure';

3- select 'ar_track_alvar' and set max_frequency (29.87Hz).

Now, follow the procedures to initialize the robot:

1- connect the robotic arm into an outlet;

2- connect the robotic arm to the computer through a USB port;

3- run 'sudo chmod 777 /dev/ttyUSB0';

4- run 'roslaunch my_dynamixel_tutorial ax18_controller.launch';

5- turn on the mobile base;

6- connect the mobile base in the computer through a USB port;

7- run 'sudo chmod 777 /dev/ttyUSB1';

8- run 'roslaunch turtlebot_bringup minimalmin.launch'.

Classes brief explanation and UML

The C++ implementation of Little John is composed of the following classes:

- LittleJohn: Class responsible for all the robot's communication (with the simulator and the real robot) and obtention of inter parameters (e.g., whole-body Jacobian matrix, end-effector pose, etc.). An object of this class is set to use in simulation or in real experiments through a parameter of the constructor.

- RoboticArm: Class responsible for the communication with the robotic arm.

- MobileBase: Class responsible for the communication with the mobile base.

The classes RoboticArm and MobileBase are meant to serve as intern attributes of the class LittleJohn and, therefore, their access occurs indirectly through an object of LittleJohn. This is made clearer in the UML that follows.

Little john uml.jpg

Doxygen documentation

Doxygen Little John


Nonlinear Control Simulation Example