background preloader

Robotics

Facebook Twitter

Wall Following Robot « MobotSoft. In this simple example we will develop a simulation of a mobile robot that follows the wall to its right.

Wall Following Robot « MobotSoft

Starting MobotSim Open MobotSim or press the “New” button to start a new project if it is already open. MobotSim always starts with a robot that has the default configuration. We are going to work with these values, so don’t change the properties of the robot. Build a suitable environment You can copy the one from the picture or design your own. Reading sensors Let’s start to write the code that run the simulation.

The following instruction triggers a sensor to take a reading and stores the distance value (in meters) in the variable s: s = MeasureRange(0,4,0) The first parameter is the number of robot, the second parameter is the number of sensor and the third parameter is 0 when you don’t want to implement any kind of Certainty Grid method. SetMobotPosition(0, 13, 12.5, 0) Sub Main SetMobotPosition(0,13,12.5,0) s = MeasureRange(0,4,0) End Sub Programming the Wall Follower algorithm Next. C++ Fast Trigonometric Functions - OscarLiang.net. To improve algorithm performance, one direct way is to shorten calculation time.

C++ Fast Trigonometric Functions - OscarLiang.net

The part that consumes the most computation power would be the trig functions. The built-in trig functions are generally very good in terms of accuracy. But we don’t need that level of precision, so we can sacrifice accuracy to achieve faster speed. We only use SIN, COS, ACOS and ATAN in our algorithm, so this post will describe only these functions. SIN and COS One popular, easy and really fast way is to use look-up table. And then use the list of results as our table, and input (in degree) as our index. so let’s say we need to get SIN(30), we just need to look up the 30th value in the table. The reason that I use 1 degree instead of smaller interval, is that not only it saves spaces, but also I won’t need that kind of precision. we can obviously do smaller interval like 0.5, or 0.2. just do some index conversion before looking up. [Upload Source Code] ACOS New method is about 15 times faster! 3 DOF Hexapod Algotithm - Arduino Forum. I tweaked the math a bit and it seems to be tracking better.

3 DOF Hexapod Algotithm - Arduino Forum

The challenge now is to coordinate 6 legs to move correctly. I thought of another way to move the servos and that is, use a direct proportional approach. I would pick the coxa (hip) servo rotation angle to use as base and have the other servos move in proportion to it. I'd increment their angles as the coxa servo moved one degree. So, femur increment angle = total femur rotation angle/total coxa rotation angle.And likewise, tibia increment angle = total tibia rotation angle/total coxa rotation angle.The math would be much simpler. It remains to be seen how this will work. Peter,If I understand what you propose, I think I already am doing it, but just for one leg.

You're right about the calculation timing. Thanks again for the reply.Regards,Pierre. Terence's HomePage. Kalman Filter Made Easy Kalman Filter - Da Theory You may happen to come across a fancy technical term called Kalman Filter, but because of all those complicated math, you may be too scared to get into it.

Terence's HomePage

This article provides a not-too-math-intensive tutorial for you and also me because I do forget stuff from time to time. Hopefully you will gain a better understanding on using Kalman filter. If you ever design an embedded system, you will very likely to come across with some noisy sensors. Let's suppose you just meet a new girl and you have no idea how punctual she will be. Timers. The AVR has different Timer types.

Timers

Not all AVRs have all Timers, so look at the datasheet of your AVR before trying to use a timer it doesn't have...This description is based on the AT90S2313. I will only describe the "simple" timer modes all timers have. Some AVRs have special timers which support many more modes than the ones described here, but they are also a bit more difficult to handle, and as this is a beginners' site, I will not explain them here. The timers basically only count clock cycles. The timer clock can be equal to the system clock (from the crystal or whatever clocking option is used) or it can be slowed down by the prescaler first. The prescaler can be set to 8, 64, 256 or 1024 compared to the system clock. The timers are realized as up-counters. The 8-bit timer is pretty simple: The timer clock (from System Clock, prescaled System Clock or External Pin T0) counts up the Timer/Counter Register (TCNT0).

Is a little more complex, as it has more modes of operation: How to generate the tripod gait ? Baskara Blog: Dasar Teori ATMega16.