Skip to content

Instantly share code, notes, and snippets.

@pestefo
Created July 2, 2014 10:55
Show Gist options
  • Save pestefo/2620b2d6c7862e0a495e to your computer and use it in GitHub Desktop.
Save pestefo/2620b2d6c7862e0a495e to your computer and use it in GitHub Desktop.
Testing Robulab v1

#Testing Robulab

In this tutorial we will make basic tests to assert that both the robulab robot and the laptop are configured correctly. We will consider as well configured if we can start a PhaROS node that handle robulab robot, so we can publish motion messages through rostopic pub command and make it to move.

Pre-conditions

  1. Robulab charged and switched on.

  2. Laptop with Ubuntu 14.04

  3. ROS Indigo installed on laptop (How to install ROS Indigo in Ubuntu 14.04)

  4. Your .bashrc file you should look like this:

    source /opt/ros/indigo/setup.bash
    source ~/PhaROS-ws/devel/setup.bash
    
    ROS_HOSTNAME=localhost    
    ROS_MASTER_URI=http://localhost:11311
  5. PhaROS installed (Read: How to Install PhaROS).

  6. Create a package for testing. In a terminal run:

    $ pharos create testrobulab
  7. Be sure that the Pharo image has not any proxies set, or if it has, they are coherent with your network configuration.

  8. Robot should be unplugged and free to move.

Ok, lets test it

  1. Connect your laptop to UBNT wireless network.

  2. Start ROS by running roscore in a terminal.

    $ roscore

    If everything goes fine it should print something like this:

    ...
    started roslaunch server http://achao:56856/
    ros_comm version 1.11.3
    
    SUMMARY
    ========
    
    PARAMETERS
     * /rosdistro: <...>
     * /rosversion: <...>
    
    NODES
    
    auto-starting new master
    process[master]: started with pid [4073]
    ROS_MASTER_URI=http://achao:11311/
    
    setting /run_id to 6e36ef46-005d-11e4-ac41-b8ee65bb26b0
    process[rosout-1]: started with pid [4086]
    started core service [/rosout]
    

    Where achao is the hostname of the laptop I am using.

  3. Open the Pharo image of your PhaROS package. In a terminal execute:

    $ rosrun testrobulab edit
  4. Download and install appropriate packages

    1. Add Peripherics repository from CAR/PhaROSPeripherics repository

      MCHttpRepository
      location: 'http://smalltalkhub.com/mc/CAR/PhaROSPeripherics/main'
      user: ''
      password: ''

    open the repository and load the latest versions on the following packages: StarGazer, StarGazerROS, StarGazerTest.

    1. Add Reusable bricks repository from CAR/ReusableBricks repository

      MCHttpRepository
      location: 'http://smalltalkhub.com/mc/CAR/ReusableBricks/main'
      user: ''
      password: ''    

    open the repository and load the latest versions on the following packages: CommonTraits, Concurrency, Equals.

    1. Add Robulab repository from CAR/Robulab repository

      MCHttpRepository
      location: 'http://smalltalkhub.com/mc/CAR/Robulab/main'
      user: ''
      password: ''

    open the repository and load the latest versions on the following packages: 1. PureNG 1. PureNGtest 1. PureROS 1. PureROSExperiments 1. PureROSNodeletsMovement 1. PureROSNodeletsKompai 1. PureROSNodeletsCaire 1. PureROSPackageKompai 1. PureROSPackageRobulab 1. PureROSPackageCaire

  5. Open a workspace and execute:

    PureROSKompai new scriptKompai1

    change it to scriptKompai2 if you are using Robulab2. This will create a PhaROS node that you can check by executing:

    $ rosnode list
    /PharoHandle-1404143614
    /rosout
  6. Let's check the available topics to publish, in a terminal execute:

    $ rostopic list
    /command_velocity
    /initialpose
    /kompai/scan
    /kompai2/pose
    /kompai2/trajectory/differential
    /orientation
    /rosout
    /rosout_agg
  7. Let's publish some motion message in /command_velocity, to do we should use rostopic pub <topic id> <topic type> <message> command. Tip: press [TAB] key to autocomplete: topic id, topic type and get message template.

    $ rostopic pub /command_velocity geometry_msgs/Twist "linear:
      x: 0.0
      y: 0.0
      z: 0.0
    angular:
      x: 0.0
      y: 0.0
      z: 0.1"   

And the robot will start to rotate. If so you are done :)

@pestefo
Copy link
Author

pestefo commented Jul 2, 2014

Version 1.

In the step #4 I just indicate how to install by hand all the packages due to the gofer script

Gofer new smalltalkhubUser: 'CAR'
project: 'Robulab';
package: 'ConfigurationOfPureROS';
load.
(Smalltalk at: #ConfigurationOfPureROS) load

still does not work.

The last modification to PureROS baseline apparently gets bound to 1.1-baseline ConfigurationOfPhaROS baseline. I say this because It fails trying to load ConfigurationOfCommonTraits which does not exist and It is states CommonTraits as a dependency with that configuration class.

Changing the versionString to #stable

   spec project: 'PhaROS' with: [
                spec 
                    className: 'ConfigurationOfPhaROS';
                    file: 'ConfigurationOfPhaROS' ;
                    repository: 'http://smalltalkhub.com/mc/CAR/PhaROS/main'; 
                    versionString: #bleedingEdge; " <------ versionString: #stable;"
                    loads: #( 'default' 'tests' ).
            ].

Seems to get the latest baseline of PhaROS, but still throws some inconsistencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment