There is a new controller added to the openHubo’s servo controller: trajectorycontroller. This controller is based on the sinoscontroller example from the OpenMR toolkit, and produces a timed sequence of reference positions for the whole robot. You can create an OpenRAVE trajectory using any of the planning plugins, save it in a standard format, then play it back with this controller. Therefore, we can now do direct physics validation of any planned motion in OpenRAVE with openHubo.
The controller is structured like this:
trajectorycontroller: takes a trajectory pointer, samples the trajectory in simulation time, and sends reference positions to an included instance of the servocontroller.
servocontroller: Calculates input velocity for each joint to reach the desired servo position.
odevelocity: Applies velocity commands to the joint “motor” to track the desired velocity.
Here is a video of a simple crouch motion using the trajectorycontroller:
This video was recorded via python with a simple python class that wraps some of the viewerrecorder commands, making it easier to record simple videos.
The standard python functions for this controller as of OpenHubo 0.6.1 are:
SetPath(trajectory) or SendCommand(‘load <trajectory-serialized>’): load a trajectory that has timing information into the controller. Returns an error if the format is invalid
SetDesired(pose): pass-through to servocontroller, allowing the trajectory controller to quickly set a single pose.
SendCommand(‘start’): begin sampling the trajectory
SendCommand(‘stop’): stop sampling the trajectory
SendCommand(‘set timestep # ‘): Adjust the sampling rate (defaults to 100Hz in sim-time)
The trajectory controller is very much in active development, and future features will hopefully include:
Mixing with feedback control (similar to the MultiController plugin in OpenRAVE)
Direct torque control (once there is a torque control mode available for the Hubo motor controllers)
Tracking error detection and early-abort conditions
OpenHubo 0.5.0 (pictured above) has been released on github, which encompasses several major changes:
A complete kinematic skeleton of the Hubo+ humanoid, including actuated and mass-accurate fingers.
Assemblies in Inventor no longer have mass overrides, ensuring accurate inertia and center of mass properties.
Collision bodies are currently the raw geometry export from Inventor. While very accurate to the skeleton, collision checks may take longer because of the complexity of the geometry.
The new model files are in the subfolder “huboplus”. To use the robot in your experimental files, simply swap out the file “huboplus.robot.xml” for jaemiHubo.robot.xml”. As explained in the Hubo+ wiki page on github, there are a few limitations to the current model revision:
Shell models were not available in time for the initial release, but will be included in the next revision to be released by Sept. 28th.
Electronic components and shells contribute additional mass that will slightly alter the current mass properties.
Demonstration scripts are currently aimed at the old Hubo2 model, though updated demonstrations will be included in the next release.
The model still makes use of several “virtual joints” and redundant translations and rotations to connect bodies together. Unfortunately, this is necessary due to the limitations of XML and the OpenRAVE format, to minimize redundancy in the model files.
A URDF version of OpenHubo is coming soon, but requires the help of someone with expertise in URDF, SRDF, and the XACRO macro language to accelerate the process.
For those first getting started with linux and working in a terminal, vim is a very useful text editor. It is available as a package through most linux distributions, and via cygwin and minGW for Windows. Unfrotunately, many of the default settings are not really user friendly, often to maximize backwards compatibility with its ancestor, vi. Over my two-ish years of using vim, I’ve gathered a bunch of additional plugins, syntax highlighting files, and little tweaks to make the experience much more powerful. Some examples:
MATLAB syntax highlighting, code checking, and syntax-based code folding
NERDCommenter plugin for fast commenting of many types of source code
XML syntax / macro shortcuts that massively simplifies editing
cscope plugin to search for C++ symbols and strings
doxygen plugin that adds shortcuts for standard comment blocks
Search highlighting by default
bash-style tab completion in menus by default
On a system without any user-tweaked vim settings, installing the tweaks on a linux system can be done with this command:
If you are using Msysgit (minGW environment), on Windows, then vim searchs for the vimfiles folder by default:
git clone git://github.com/robEllenberg/vimfiles.git ~/vimfiles
ln -s vimfiles/.vimrc ~/.vimrc
If you have some plugins installed already, it may be easy to copy your old .vim or vimfiles folder to a backup location, then copy your changes into the cloned repository. If you have a github account, you can also make your own fork of my repository and track your own tweaks as well. The big advantage of using a git repository in your vimfiles folder is that you can easily track changes to your tweaks, and revert to a known state if you mess something up. Since many plugins are configured as submodules, it is easy to update all the plugins at once to their latest version:
git submodule foreach git pull origin master
Feel free to email me if you have any plugins you’d like me to include, or find any errors with my setup.
Recently, after upgrading to Ubuntu 12.04, I noticed that something was odd with ssh tab completion. Specifically, when I tried to complete one of the hosts stored in my ~/.ssh/config file, it looked like this:
There was always this extra character at the end of the shortcut that I’d have to delete. It turns out that ^M is the carriage return character, which means that the config file has somehow become DOS-formatted (i.e. lines are terminated with CR-LF). The tab-completion routine was treating the CR character as part of the host name. It seems obvious in retrospect, of course. There’s an easy way to fix this: