Showing posts with label ROS. Show all posts
Showing posts with label ROS. Show all posts

05 July 2020

SRC2 - Explicit Steering - Wheel Speed

SRC2 Rover
This fourth post about the qualifying round of the NASA Space Robotics Challenge - Phase 2 (SRC2) addresses the speed of the wheels of the rover, shown to the right, under the various possible motions. The rover uses Explicit Four Wheel Steering which allows the orientation of the wheels to be independently changed. The second and third posts explored the geometry to determine the position of the wheels for a turn, pivoting in place, and crab / straight movement. See the first post for the basics of the competition. 

Wheel Orientation

The orientation of the wheels on the rover determines the speed for the wheels. In straight or crab movement the speed is the same for all wheels. When turning, shown in the diagram below, the speeds are different for the inner and outer wheels. The requested overall speed of the rover, determined at the center of the rover, is used to calculate the inner and outer speeds. 



 Term        Description
 ICR Instantaneous Center of Rotation
 Rr Radius from ICR to center of rover
 RiRo Radius of  rover's inner (i) and outer (o) sides through ICR
 Wb, Wt Wheel base and wheel track of rover. Lengths are representative of actual size.
 WRi, WRo Radius of inner(i) and outer (o) wheels
  δiδo  Steering angle for inner (i) and outer (o) wheels

Visualize on the diagram three concentric circles drawn from the ICR. One circle passes through the center of the rover while the others pass through the inner and outer corners, or wheels, of the rover. The second post calculated the wheel's turning radius as:


The rover radius is Rr, the distance from the ICR to the center of the rover. 

The speed (Sr and turn radius of the rover determine the time (Tr) to complete a full circle, as shown in the first equation below. The next equation calculates the speed of either set of wheels (WR) using the circumference of the respective circles. Subsequently, that equation can be simplified as shown in the formulations that follow. 



Twist Calculation

The standard ROS movement command is the twist message. It contains two 3 dimensional vectors. One specifies the linear movement for the x, y, and z dimensions. The other specifies the orientation, also as x, y, and z, but meaning roll, pitch, and yaw respectively. 

The calculations for steering orientation and speed are all based on the radius of the turn. That turn radius needs to be calculated using the X velocity and the Yaw from the message. Recall from post three that turning during a crab movement is not under consideration so the linear Y value is ignored. 

Getting to how to do the calculation requires some interesting analysis but the final, actual calculation is extremely simple. The starting point is the Yaw in radians / second. The first equation determines the time it would take to turn a full 2𝜋 radians at the Yaw rate. Or, how long to traverse a full circle. 



Next, that time is used to determine the circumference of the circle using the X speed. Knowing the circumference the radius is determined. The equations show the individual steps but then combine them to reduce them to a simple calculation. Everything should reduce to such simplicity. Note that dimensional units are included to assure the final units are valid.

03 July 2020

SRC2 - Explicit Steering - Crab, Straight, and Pivot Movements


SRC2 Rover
This is the third in a series of post about my involvement with the qualifying round of the NASA Space Robotics Challenge - Phase 2 (SRC2). The first post introduced the basics of the competition. One aspect of the challenge is there is no controller for the rover depicted to the right. It uses Explicit Four Wheel Steering which allows the orientation of the wheels to be independently changed. This provides multiple ways for the rover to move, e.g. straight, crab, turn, pivot.

The second post explored the geometry on positioning the wheels for a turn. This post will address pivoting in place and crab movement, i.e. moving sideways. It also addresses the trivial crab case of moving straight forward or back. 

27 June 2014

Cold Turkey on Linux

I bit the bullet a few weeks ago with Linux. I was getting ready to go to WPI for the SRR competition and decided to go cold turkey on my laptop. I put in a SSD and loaded Zorin Linux. It us recommended as a substitute for Win XP. One reason I liked it is the rolling upgrades instead of the Ubuntu staged upgrades.

There was still frustration. The WiFi did not work so I used the software updater to install the drivers it found from Broadcom. The OS would not boot after that. I reinstalled just before leaving and took the memory stick with the Zorin Live distro with me figuring I could always reload from it. I was impressed by the quickness of the installation. That encouraged me since if I messed up the laptop I could always quickly reinstall. I also had my iPad so accessing email, FB, and Twitter (I did a lot of tweeting with photos) were always available. 

I kept busy so it was not until Friday night up in VT to visit my sister that I had time to do much with the laptop. I cannot recall what I did - may have changed some GUI options - but the system got messed up. When Zorin boots it shows a menu that allows recovery mode boot, and also to boot into a previous release.

At one point I tried the recovery mode. One option was to connect to the network which I did - wired not WiFi - and then to restore packages and the default configurations. After that I continued the boot and things were back to normal. I think it was mainly the configurations that made the difference. What really impressed me is that my user account and some other user settings were still there. I've done restore operations in other situations and lost user specific configuration information that I thought should have been saved.

I tried the update drivers but selected a different option. No good. Even the restore packages did not help. In desperation I booted into the previous version of Zorin. It came up fine with my user account.

This time I searched the web for information on installing the WiFi drivers. Cannot recall what I found but it worked. It even automatically found the hotel WiFi and connected. All I needed was to go to their web page and accept the terms.

I got email and other stuff working and have not touched the laptop since coming home. I cannot recall if I got the later Zorin release fixed or not.

One thing that disappointed me was the speed. I expected the system to be more responsive than the XP that was on there, especially with an SSD installed. Of course it is hard to compare the speed but I was not impressed by the response.

Being encouraged by this I turned to an older PC I had setup last year with XP and Ubuntu during my last foray into Linux. I first tried to install the 64 bit Zorin because the CPU is an AMD 64 bit. But it just hung. Finally found a comment that said with 2G memory or less the Zorin 64 would not install. Thanks for the error message, guys.

I tried Zorin Lite but it is really stripped down so replaced it with the standard Zorin 32. It is up and running but it is sluggish. The system is not that old - hey, it has an AMD 64 bit CPU - so it is a bit disappointing even for just the testing I am doing. For example, just opening Files (Nautilus, I guess) takes 10 seconds or so.

Since my main interest is using Linux on robots I loaded ROS (Robot Operating System) and OpenCV (for vision processing). Both installs went smoothly, something I usually don't experience with Linux. It is especially encourage for ROS since they recommend Ubuntu but I hoped that Zorin, as a derivative, would be okay.

I successfully worked through some of the ROS tutorials but the sluggishness bugged me. But they did work which is hopeful.

Loading OpenCV was tedious because it compiles from source. It t-o-o-k f-o-r-e-v-e-r. But it did install and I then was able to build the C++ samples. Don't know why the install did not build them since it did the C examples. But again, f-o-r-e-v-e-r. I read a couple chapters of a book while it cranked away.

Overall encouraging, enough that I am considering getting a new system for Linux work. It would have a lot of RAM (16G or more), a multi-core CPU and directly support two monitors. I don't know that my code based for the robot will ever be gigantic but I do not want to wait for it. This is the first time I am going for a fast machine.

I am actually tempted to get a System76 laptop: https://system76.com/laptops/model/bonx8 and use it for my main machine. But I would need it to support the second monitor and need to check on that.

SRC2 - Explicit Steering - Wheel Speed

SRC2 Rover This fourth post about the  qualifying round of the NASA  Space Robotics Challenge - Phase 2  (SRC2) addresses t he speed of the ...