问:
Communicating between a beaglebone black and an arduino using ttyO4
I'm trying to get an arduino to talk with a beaglebone black.
I have followed this tutorial for getting ttyO4 open on the BBB and used the following command on to set the serial line correctly:

wiring is set up according to this tutorial.
    stty -F /dev/ttyO4 cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts

next data is sent using the following method:

```<code>echo s123 > /dev/ttyO4
</code>```

the arduino uses the followingvoid loop(){
 code to check for serial communication:

```<code>#include <SPI.h>

void setup(){ //////////////SETUP///////////////////////
  Serial.begin(9600);
}
void loop(){
      if(Serial.available()>=4){
         digitalWrite(12, HIGH);
         delay(1000);               // wait for a second
         digitalWrite(12, LOW);   // turn the LED on (HIGH is the voltage level)
         delay(1000);               // wait for a second
         digitalWrite(12, HIGH);
         byte b1,b2,b3,b4;
         b1=Serial.read();
         }
    }
}
</code>```

However it seems no message is received. It does not give any error either.

As an alternative I have also tried a variant of the code suggested in the wiring tutorial resulting in the following code:

```<code>import sys
from bbio import *

Serial2.begin(9600)
for arg in sys.argv:
    print arg
    Serial2.write(arg)
    delay(5)
</code>```

called with pyton test s123 this printed s123 but the arduino remained silent.
Edit I have now also tried to exactly follow the wiring tutorial so that gave me the following sketch:

```<code>char inData[20]; // Allocate some space for the string
char inChar=-1; // Where to store the character read
byte index = 0; // Index into array; where to store the character

void setup() {
  Serial.begin(9600);
  pinMode(13, OUTPUT);   // digital sensor is on digital pin 2
  digitalWrite(13, HIGH);
  delay(2000);
  digitalWrite(13, LOW);
  delay(500);
}

void loop()
{
  Serial.write("A");
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  if (Comp("A")==0) {
      digitalWrite(13, HIGH);
      delay(1000);
      digitalWrite(13, LOW);
      delay(500);
  }
}

char Comp(char* This) {
    while (Serial.available() > 0) // Don't read unless
                                   // there you know there is data
    {
        if(index < 19) // One less than the size of the array
        {
            inChar = Serial.read(); // Read a character
            inData[index] = inChar; // Store it
            index++; // Increment where to write next
            inData[index] = '\0'; // Null terminate the string
        }
    }

    if (strcmp(inData,This)  == 0) {
        for (int i=0;i<19;i++) {
            inData[i]=0;
        }
        index=0;
        return(0);
    }
    else {
        return(1);
    }
}
</code>```

and on the BBB we turn on the echo script with

```<code>/PyBBIO/examples$ sudo python serial_echo.py
</code>```

The effect remains that there is no error but also no data delivery.

答:
The code shown below fixes one problem with the code in the original post: pin 12 was not declared as an output pin.   By default, arduinos start up with all IO pins set as inputs.  Given this, the digitalWrite(12, ...) calls in OP's loop() do nothing more than turn off and on the  input pullup setting on pin 12.

In other words, arduino serial reception may be working ok in your setup, but the indication mechanism ‒ blinking an LED or whatever via pin 12 ‒ was not working.

Note, in tests I ran, I wired from digital pin 12 on a Funduino mega (clone of an arduino mega) to the base of a transistor that switches power to an LED.  Sending the board a string of k characters via the arduino-ide serial monitor caused the LED to flash k times (or k-3 the first time, due to the Serial.available()>=4 test).

```<code>#include <SPI.h>

void setup(){   /////////SETUP///////////////
  Serial.begin(9600);
  pinMode(12, OUTPUT);
}
void loop(){
  if(Serial.available()>=4){
    digitalWrite(12, HIGH);
    delay(500);        // wait halfsecond
    digitalWrite(12, LOW); // turn the LED on (HIGH is the voltage level)
    delay(500);        // wait halfsecond
    digitalWrite(12, HIGH);
    byte b1,b2,b3,b4;
    b1=Serial.read();
  }
}
</code>```

Body:
The code shown below fixes one problem with the code in the original post: pin 12 was not declared as an output pin.   By default, arduinos start up with all IO pins set as inputs.  Given this, the digitalWrite(12, ...) calls in OP's loop() do nothing more than turn off and on the  input pullup setting on pin 12.

In other words, arduino serial reception may be working ok in your setup, but the indication mechanism ‒ blinking an LED or whatever via pin 12 ‒ was not working.

Note, in tests I ran, I wired from digital pin 12 on a Funduino mega (clone of an arduino mega) to the base of a transistor that switches power to an LED.  Sending the board a string of k characters via the arduino-ide serial monitor caused the LED to flash k times (or k-3 the first time, due to the Serial.available()>=4 test).

#include <SPI.h>

void setup(){   /////////SETUP///////////////
  Serial.begin(9600);
  pinMode(12, OUTPUT);
}
void loop(){
  if(Serial.available()>=4){
    digitalWrite(12, HIGH);
    delay(500);        // wait halfsecond
    digitalWrite(12, LOW); // turn the LED on (HIGH is the voltage level)
    delay(500);        // wait halfsecond
    digitalWrite(12, HIGH);
    byte b1,b2,b3,b4;
    b1=Serial.read();
  }
}


问:
What algorithm should I implement to program a room cleaning robot?
For this question assume that the following things are unknown:

The size and shape of the room

The location of the robot

The presence of any obstacles

Also assume that the following things are constant:

The size and shape of the room

The number, shape and location of all (if any) obstacles

And assume that the robot has the following properties:

It can only move forward in increments of absolute units and turn in degrees. Also the operation that moves will return true if it succeeded or false if it failed to move due to an obstruction

A reasonably unlimited source of power (let's say it is a solar powered robot placed on a space station that faces the sun at all times with no ceiling)

Every movement and rotation is carried out with absolute precision every time (don't worry about unreliable data)

Finally please consider the following properties of the robot's environment:

Being on a ceiling-less space station the room is a safe but frustratingly close distance to passing comets, so the dust (and ice) are constantly littering the environment.

I was asked a much simpler version of this question (room is a rectangle and there are no obstacles, how would you move over it guaranteeing you could over every part at least once) and after I started wondering how you would approach this if you couldn't guarantee the shape or the presence of obstacles. I've started looking at this with Dijkstra's algorithm, but I'm fascinated to hear how others approach this (or if there is a well accepted answer to this? (How does Roomba do it?)

答:
As far as I know, this problem hasn't been "solved."

Formally, this is an online coverage problem. Coverage, because we must cover each point on the floor, and online because we do not have offline access to the map. If you are interested in the most recent results, I suggest you lookup "robotic online coverage algorithms," perhaps in google scholar (there are lots and lots of great results). In addition to @embedded.kyle's very colorful (re)post, I'll add some details (I'll also try to quickly find a few simple results):

Dijkstra's will get you a path, but not necessarily a coverage. For example, how do you specify to Dijkstra's that you must visit each point in the graph, instead of visiting one point as quickly as possible? You can run all-pairs shortest paths, but what are the points? You don't have a map.

Online algorithms like this are often called "bug" algorithms because they tend to look like a bug wandering across an area, bumping into something, then wandering around it a bit.

With no obstacles, and a rectangular room, and assuming you start on the boundary a boustrophedon (way of the ox) path is optimal.

Funny that farmers have been doing this forever, right? http://en.wikipedia.org/wiki/Boustrophedon. This can be extended to rooms with obstacles by finding roughly-rectangular area which are free of obstacles. Howie Choset worked on this a bit.

To cover an area with unknown perimeter, and assuming you don't start on the perimeter, what is the optimal strategy? Well, imagine you drop into the world, and can't see the perimeter. You can walk in a straight line until you reach the perimeter, then do a boustrophedon, right? Except now you "wasted" the time spent finding the perimeter, because you will cover that part twice.  This is why robots tend to spiral: By the time you reach a boundary, you have covered a lot of the area ($\pi*d^2$ where $d$ is the distance to the nearest boundary, right?). This is helpful: now you are guaranteed to find the nearest boundary, and can trace it out.

This is a huge, fascinating area. I'm sorry I can't provide a better summary!

The biggest problem is you don't have a map. Without a map, you are limited to simple actions like perimeter following, and moving along a path (like the spiral mentioned).  So, there exist some robots that actually build the map while cleaning, decompose the mapped-out area into shapes, then cover each shape to ensure coverage. See: http://mintcleaner.com/

ContentLicense: CC BY-SA 3.0


问:
language to code Beaglebone
I'm trying to build a hexapod with beaglebone in the linux environment (Im thinking of using Ubuntu). What is the best language to use for coding purpose to make robot controls, camera and wifi integration etc.

答: You're going to want to do this using ros. This will allow you to use both python and cpp. I would reccomend doing all control and estimation in cpp and and camera stuff in python. Ros also works on networks of computers so you will be able to communicate with other linux machines running ros on the same network.</p>

Title: language to code Beaglebone


问:
Formatting an SD card for Panda Board ES
I have a Panda Board ES. I am not able to get it to boot. I sent it back to SVTronics to get it checked and they said that the board is OK; I am the one who is not able to configure it properly.

After doing a little research and following all the directions on the Panda Board and Ubuntu website, I am still not able to get the board to boot. I think the problem is how I am formatting the SD card. I am using disk utility for Mac to format the SD card to "MSDOS(FAT)" partition.

I would like to know how to format an "SD Card" on a Macintosh to install Ubuntu on it for Panda Board ES.

答:
It's possible that your problem is not the filesystem format (although you should probably using Linux EXT2/EXT3/EXT4 instead of MS-DOS/FAT).  Is the bootloader installed properly?

Here are some posts on putting an Ubuntu bootloader on an SD card:

https://askubuntu.com/questions/191902/how-to-boot-ubuntu-from-my-sd-card

https://bbs.archlinux.org/viewtopic.php?pid=760477

More broadly, have you looked at this wiki, dedicated to putting Ubuntu on Panda boards?
http://www.omappedia.org/wiki/OMAP_Ubuntu_Main


答:
In this answer, I will outline some techniques for diagnosing RS232-style serial communication problems.

For a two-way serial communication link between two devices to work, at the most basic level we need a connection from  TxD on device 1 to RxD on device 2 and a connection from  TxD on device 2 to RxD on device 1.

Voltage or current level conversions may be needed; for example, if device 1 uses -12 V for mark and +12 V for space while device 2 uses +3.3 V for mark and 0 V for space, voltage inversion/scaling/shifting is an obvious requirement.

For the OP's case, 3.3 V at the Beaglebone needs to be translated to or from 5.0 V at the Arduino.  Note that Arduinos with an 8 MHz crystal can operate at 3.3 V and may have a 3.3 V regulator rather than a 5 V regulator.   Use of 3.3 V on the Arduino would allow dropping out the voltage converter board shown in the OP, ie would remove one possible problem source.

If you have a 3.3 V power supply, you can attach that to Arduino Vcc, but don't attach more than one power source at once.  Ie, if you attach 3.3 V to Vcc, don't plug in a USB cord, and don't hook +RAW or the power jack to anything.

The RS232 standard provides several control lines [eg request to send (RTS), clear to send (CTS), data terminal ready (DTR), and data set ready (DSR)] which could be discussed in a comprehensive treatise on diagnosing RS232 problems but won't be discussed at any length here.  A Beaglebone Serial ports / UART webpage on beaglebone.cameon.net shows pin numbers for control lines, eg:

```<code>           RX      TX     CTS     RTS     Device
UART4    P9_11   P9_13   P8_35   P8_33   /dev/ttyO4
</code>```

It may be necessary to jumper CTS high or low.

To recap:  We need to connect TxD, RxD on device 1 to RxD, TxD on device 2.  To make that connection, we need to identify the TxD and RxD pins on each device.  Beaglebone and Arduino devices may have several sets of TxD, RxD pairs.  One of the best, quickest, and most-certain ways to check if you are using the correct pair (eg, TX0,RX0 instead of TX1,RX1 on an Arduino Mega, or UART4 instead of UART3 or UART5 on a Beaglebone) and have properly enabled it is to run a program that continuously sends a pattern of data to TxD, and verify with an oscilloscope, logic analyzer, logic probe, or LED that the expected data pattern appears at the expected pin.

If you are using a scope, the program should send a simple and steady stream of data at a reasonably high datarate, like 9600 bps.  Eg, run a program like while 1: send 'U' and check that your TxD pin is toggling at the right rate and other pins aren't.

If you are using an LED, make it not too bright (eg, 2KΩ-20KΩ dropping resistor) so you can look closely at the light; make it red or amber so it will light up ok on 3.3 V; use a low datarate (300 bps) so you can see flickering bits; and use a repetition pattern obvious to the eye; eg:

```<code>while 1:
   send '@'*60    # Ie, send a string of 60 @ signs
   wait 1 sec
</code>```

On the Beaglebone, if you don't find any output on Tx4, revise your test program to output on Tx0 (which I think is automatically enabled and available in userspace) and use that to verify that your test program and probe are working.  If it works ok on Tx0 but not on Tx4, look for additional web information about enabling  Beaglebone serial ports and making them available to the user.

After you have verified that output works on some TxD pins with no voltage shifter attached, attach the shifter and repeat the test.  If successful, also test the outputs of the voltage shifter.  Then attach RxD of the other device to shifter output and verify that the desired data pattern is arriving at that RxD pin.

If you are using a scope, you'll have seen whether voltages are correct (ie 0 and +3.3 or +5.0) at each stage of each connection.  If you are using an LED probe, you may be able to tell if voltage at one point is more than at another; but you might also try running data patterns with more zeroes (eg long strings of \0), or more ones (long strings of 0x7F or 0xFF characters) and using a voltmeter to estimate voltages.

Title: Communicating between a beaglebone black and an arduino using ttyO4

Body:
I'm trying to get an arduino to talk with a beaglebone black.
I have followed this tutorial for getting ttyO4 open on the BBB and used the following command on to set the serial line correctly:

wiring is set up according to this tutorial.
    stty -F /dev/ttyO4 cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts

next data is sent using the following method:

```<code>echo s123 > /dev/ttyO4
</code>```

the arduino uses the followingvoid loop(){
 code to check for serial communication:

```<code>#include <SPI.h>

void setup(){ //////////////SETUP///////////////////////
  Serial.begin(9600);
}
void loop(){
      if(Serial.available()>=4){
         digitalWrite(12, HIGH);
         delay(1000);               // wait for a second
         digitalWrite(12, LOW);   // turn the LED on (HIGH is the voltage level)
         delay(1000);               // wait for a second
         digitalWrite(12, HIGH);
         byte b1,b2,b3,b4;
         b1=Serial.read();
         }
    }
}
</code>```

However it seems no message is received. It does not give any error either.

As an alternative I have also tried a variant of the code suggested in the wiring tutorial resulting in the following code:

```<code>import sys
from bbio import *

Serial2.begin(9600)
for arg in sys.argv:
    print arg
    Serial2.write(arg)
    delay(5)
</code>```

called with pyton test s123 this printed s123 but the arduino remained silent.
Edit I have now also tried to exactly follow the wiring tutorial so that gave me the following sketch:

```<code>char inData[20]; // Allocate some space for the string
char inChar=-1; // Where to store the character read
byte index = 0; // Index into array; where to store the character

void setup() {
  Serial.begin(9600);
  pinMode(13, OUTPUT);   // digital sensor is on digital pin 2
  digitalWrite(13, HIGH);
  delay(2000);
  digitalWrite(13, LOW);
  delay(500);
}

void loop()
{
  Serial.write("A");
  digitalWrite(13, HIGH);
  delay(100);
  digitalWrite(13, LOW);
  delay(100);
  if (Comp("A")==0) {
      digitalWrite(13, HIGH);
      delay(1000);
      digitalWrite(13, LOW);
      delay(500);
  }
}

char Comp(char* This) {
    while (Serial.available() > 0) // Don't read unless
                                   // there you know there is data
    {
        if(index < 19) // One less than the size of the array
        {
            inChar = Serial.read(); // Read a character
            inData[index] = inChar; // Store it
            index++; // Increment where to write next
            inData[index] = '\0'; // Null terminate the string
        }
    }

    if (strcmp(inData,This)  == 0) {
        for (int i=0;i<19;i++) {
            inData[i]=0;
        }
        index=0;
        return(0);
    }
    else {
        return(1);
    }
}
</code>```

and on the BBB we turn on the echo script with

```<code>/PyBBIO/examples$ sudo python serial_echo.py
</code>```

The effect remains that there is no error but also no data delivery.

Body:
In this answer, I will outline some techniques for diagnosing RS232-style serial communication problems.

For a two-way serial communication link between two devices to work, at the most basic level we need a connection from  TxD on device 1 to RxD on device 2 and a connection from  TxD on device 2 to RxD on device 1.

Voltage or current level conversions may be needed; for example, if device 1 uses -12 V for mark and +12 V for space while device 2 uses +3.3 V for mark and 0 V for space, voltage inversion/scaling/shifting is an obvious requirement.

For the OP's case, 3.3 V at the Beaglebone needs to be translated to or from 5.0 V at the Arduino.  Note that Arduinos with an 8 MHz crystal can operate at 3.3 V and may have a 3.3 V regulator rather than a 5 V regulator.   Use of 3.3 V on the Arduino would allow dropping out the voltage converter board shown in the OP, ie would remove one possible problem source.

If you have a 3.3 V power supply, you can attach that to Arduino Vcc, but don't attach more than one power source at once.  Ie, if you attach 3.3 V to Vcc, don't plug in a USB cord, and don't hook +RAW or the power jack to anything.

The RS232 standard provides several control lines [eg request to send (RTS), clear to send (CTS), data terminal ready (DTR), and data set ready (DSR)] which could be discussed in a comprehensive treatise on diagnosing RS232 problems but won't be discussed at any length here.  A Beaglebone Serial ports / UART webpage on beaglebone.cameon.net shows pin numbers for control lines, eg:

           RX      TX     CTS     RTS     Device
UART4    P9_11   P9_13   P8_35   P8_33   /dev/ttyO4

It may be necessary to jumper CTS high or low.

To recap:  We need to connect TxD, RxD on device 1 to RxD, TxD on device 2.  To make that connection, we need to identify the TxD and RxD pins on each device.  Beaglebone and Arduino devices may have several sets of TxD, RxD pairs.  One of the best, quickest, and most-certain ways to check if you are using the correct pair (eg, TX0,RX0 instead of TX1,RX1 on an Arduino Mega, or UART4 instead of UART3 or UART5 on a Beaglebone) and have properly enabled it is to run a program that continuously sends a pattern of data to TxD, and verify with an oscilloscope, logic analyzer, logic probe, or LED that the expected data pattern appears at the expected pin.

If you are using a scope, the program should send a simple and steady stream of data at a reasonably high datarate, like 9600 bps.  Eg, run a program like while 1: send 'U' and check that your TxD pin is toggling at the right rate and other pins aren't.

If you are using an LED, make it not too bright (eg, 2KΩ-20KΩ dropping resistor) so you can look closely at the light; make it red or amber so it will light up ok on 3.3 V; use a low datarate (300 bps) so you can see flickering bits; and use a repetition pattern obvious to the eye; eg:

while 1:
   send '@'*60    # Ie, send a string of 60 @ signs
   wait 1 sec

On the Beaglebone, if you don't find any output on Tx4, revise your test program to output on Tx0 (which I think is automatically enabled and available in userspace) and use that to verify that your test program and probe are working.  If it works ok on Tx0 but not on Tx4, look for additional web information about enabling  Beaglebone serial ports and making them available to the user.

After you have verified that output works on some TxD pins with no voltage shifter attached, attach the shifter and repeat the test.  If successful, also test the outputs of the voltage shifter.  Then attach RxD of the other device to shifter output and verify that the desired data pattern is arriving at that RxD pin.

If you are using a scope, you'll have seen whether voltages are correct (ie 0 and +3.3 or +5.0) at each stage of each connection.  If you are using an LED probe, you may be able to tell if voltage at one point is more than at another; but you might also try running data patterns with more zeroes (eg long strings of \0), or more ones (long strings of 0x7F or 0xFF characters) and using a voltmeter to estimate voltages.


问:
Passing power through a motor
How would one go about passing power through a motor?

Let's say we have some basic robot which has a motor that slowly spins a limb, on each end of that limb, there is a motor which again spins a limb. Because the first motor is always going to be spinning, any wires would twist and eventually break, so a wired approach wouldn't work. The same goes for the subsequent motors.

I know that dc motors use brushes to get past this, but how is this generally solved in engineering/robotics? This must be a problem that has come up before, and there must be a solution to it.

Any ideas? :)

答:
It is called a slip ring.

It works the same as a brushed motor.

See here for a robotic oriented one.

Larger versions handle power, and cost more.

Also near field technologies such as those used to wirelessly charge your electric toothbrush, and more recent wireless cell phone chargers, are potential solutions

Title: Passing power through a motor


问:
Ambiguous definition of Error-State (Indirect) Kalman Filter
I am confused by what precisely the term "Indirect Kalman Filter" or "Error-State Kalman Filter" means.

The most plausible definition I found is in Maybeck's book [1]:

As the name indicates, in the total state space (direct) formulation, total states
  such as vehicle position and velocity are among the state variables in the filter,
  and the measurements are INS accelerometer outputs and external source
  signals. In the error state space (indirect) formulation, the errors in the INS-
  indicated position and velocity are among the estimated variables, and each
  measurement presented to the filter is the difference between INS and external
  source data.

20 years later Roumeliotis et al. in [2] write:

The cumbersome modeling of the specific vehicle and its interaction with a dynamic environment is avoided by selecting gyro modeling instead. The gyro signal appears in the system (instead of the measurement) equations and thus the formulation of the problem requires an Indirect (error-state) Kalman filter approach.

I cannot understand the bold part, since Lefferts et al. in [3] write much earlier:

For autonomous spacecraft the use of inertial reference units as a model
  replacement permits the circumvention of these problems.

And then proceed to show different variants of EKFs using gyro modeling that are clearly direct Kalman Filters according to Maybeck's definition: The state only consists of the attitude quaternion and gyro bias, not error states. In fact, there is no seperate INS whose error to estimate with an error-state Kalman filter.

So my questions are:

Is there a different, maybe newer definition of indirect (error-state) Kalman Filters I am not aware of?

How are gyro modeling as opposed to using a proper dynamic model on the one hand and the decision whether to use a direct or indirect Kalman filter on the other hand related? I was under the impression that both are independent decisions.

[1] Maybeck, Peter S. Stochastic models, estimation, and control. Vol. 1. Academic press, 1979.

[2] Roumeliotis, Stergios I., Gaurav S. Sukhatme, and George A. Bekey. "Circumventing dynamic modeling: Evaluation of the error-state kalman filter applied to mobile robot localization." Robotics and Automation, 1999. Proceedings. 1999 IEEE International Conference on. Vol. 2. IEEE, 1999.

[3] Lefferts, Ern J., F. Landis Markley, and Malcolm D. Shuster. "Kalman filtering for spacecraft attitude estimation." Journal of Guidance, Control, and Dynamics 5.5 (1982): 417-429.

答:
Hi and welcome to the wide, ambiguous, sometimes confusing world of research. But seriously, looking at 20 years of papers will sometimes produce these confusions.
Let's look at what's going on. In the first reference, what they are saying is:

An INS/Gyro is nice, but has an error in it. That error changes (drifts) over time. Therefore, the error in the INS is really a part of the state of the system.

The markov assumption used in the Kalman filter assumes that the current estiamte encapsulates all of the state of the system, and all of the previous states of the system. The update step of the EKF/FK assumes that the sensors measure the state of the system directly, and without bias. However, an INS has a bias (the error), and that bias changes. So our measurable state (the measurement from the INS / Gyro) is

$$z(t)=x^\star(t) + b^\star(t)+n$$

for bias vector $b^\star$ and noise $n$. Vector $b^\star$, unfortunately, is unknown, time-varying, and not zero-mean. Vector $n$ is assumed to be zero-mean noise (e.g., unbiased). So if we knew $b^\star(t)$, we could subtract it from $z$ to get an unbiased measurement of the state. This is useful. So an estimate of $b^\star(t)$ is kept as part of the state.

An error-state kalman filter makes a new state vector,

$$
\begin{bmatrix}
x(t) \\
b(t)
\end{bmatrix}
=
\begin{bmatrix}
x(t)^\star \\
b(t)^\star
\end{bmatrix}
+n
$$
where again $x^\star$ is the true state and $b^\star$ is the true bias.

Ok, moving on to reference two, they seem to say that the gyro signal (which has measurements of the form $z(t)=x^\star + b(t) + n$ again) is used instead of assuming the gyro is measuring the state directly. That fits with what I know about Prof Roumeliotis' research as well as the definition of error-state KF and ref 1.

Now ref 3 is worded slightly bad. I wasn't able to acquire a PDF to review quick. What I think it means is they are using the common assumption that a good model of the system dynamics are not available for a prediction (or propagation) step. Instead, they are assuming that the INS measurements are a decent estimate of the system's state, and then using other sensors to update the estimate of the state.

This is akin to using odometry instead of modelling how control inputs produce a change of state in a wheeled robot. Yes, the forward-propogated estimate will have the bias of the INS in it, but the measurements should correct it. In fact, the introduction to that paper states the same thing we've summarized here, that bias in gyro should be a part of the system to be estimated.

This is sort of a high-level summary, which is the best I can do at this point. If there are specific concerns, I can edit as needed.


问:
What is inverse depth (in odometry) and why would I use it?
Reading some papers about visual odometry, many use inverse depth. Is it only the mathematical inverse of the depth (meaning 1/d) or does it represent something else. And what are the advantages of using it?</p>

答: Features like the sun and clouds and other things that are very far off would have a distance estimate of inf. This can cause a lot of problems. To get around it, the inverse of the distance is estimated. All of the infs become zeros which tend to cause fewer problems.</p>


答: Ubuntu is fine if you are familiar with it, if you start having jitter issues you can add the real time mods to the kernel but that is almost certainly not a problem you will face. Adafruit has some decent python libraries for the beagle bone black at https://github.com/adafruit/adafruit-beaglebone-io-python. Genrally it is best to prototype in the easiest language you can get away with as it is less frustrating and faster, but that is somewhat personal option. </p>

Title: language to code Beaglebone

Body: I'm trying to build a hexapod with beaglebone in the linux environment (Im thinking of using Ubuntu). What is the best language to use for coding purpose to make robot controls, camera and wifi integration etc.


问:
beaglebone black power supply for hexapod
I am trying to build a hexapod with camera interfacing using a beaglebone black for college project. I'm not sure what power supply to give so it can power up to bot, having in mind that it should be portable (mobile) and it should power about 18 servo motors along with the camera, wifi and the processor. Your help is needed very badly as i'm nearing the deadline for the project.

答: 18 servos is a lot of power no matter their size but you are going to need to be more specific with what kind of servos you are talking about. That said, this What is the best way to power a large number (27) servos at 5 V? is a good answer to your question. </p>


答:
As one user has said, ROS is a very good framework for robotics platforms that supports python and c++. I highly recommend downloading the VirtualBox image of ROS and giving it a try, it takes about 5 minutes excluding download.

ROS will give you a communication framework between machines on a network, and also between subsystems on the robot (mobility, state estimation, vision, etc). Included in ROS is the Computer Vision library OpenCV which may interest you if you are using a camera to sense some state or parameter.

In addition to ROS, I can recommend Simulink for your algorithmic development. Simulink is a simulation environment with very useful pre-validated libraries. After simulating and validating your module, you can compile it into C/C++, then put that into ROS so that your I/O is handled by ROS.
I use this for almost all kinematic or dynamic systems because it speeds up development significantly, although I avoid doing any I/O directly in Simulink.

Title: language to code Beaglebone


问:
Code control your arduino with keyboard
I've seen lots of examples on how to communicate from Arduino to the computer, but the few that talked about computer to Arduino communications were very hard to understand.

My question is: What code can I use to control my arduino Uno with my keyboard

if it helps, I'm trying to set up a WASD steering behavior.

答: This is probably not an answer you are looking for but it helps simplifying the problem. You need first to pick up the right tools to achieve this simple project. First of all, you need a way to detect a keyboard event. In C/C++, there are many APIs for this purpose. For example, GLUT is an old friendly API for this stuff. For this simple project, I recommend using it because it is very simple. After that you need another API for supporting serial communication protocol which allows you to send and receive data from COM port. Windows supports serial communication. If you know C/C++ then this is a piece of cake. Since you didn't mention which language you are using, you might not get a code for your problem. </p>

Title: Code control your arduino with keyboard


问:
LT1157 Logic Level Question
I plan to use the LT1157 in my application PCB to act as a switch control from a micro controller side to control the On/Off state of 2 module boards which will be connected in the PCB.

1st Load is 5V 1A.

2nd Load is 3.3V 500mA.

The LT1157 will get a 5V input at the Vs terminal.

Does anyone know how much voltage is required to be used at the IN1 and IN2 pins? The datasheet doesn't say how much voltage can be used here. I am guessing it will be 5V, but can it do logic level with 3.3V? My microcontroller board gives an output of 3.3V and not 5V so I'll have to make a logic Level converter before feeding the pins IN1 and IN2 if it's not 3.3V tolerant.

Please confirm, if anyone has used this IC before.

答:
The answer is on page 2 of the datasheet. The minimum "Input High Voltage" is listed as "70% × VS". Therefore, if you supply voltage (VS) is 5V, the minimum specified input voltage would be 3.5V. This value is for operation over the entire specified temperature range.

It MAY work with 3.3V inputs (probably unreliably), but it would be better to convert the inputs to 5V logic. If your application will allow you to use a low-side driver, you could power the LT1157 from 3.3V and use a low-side driver to switch power for your 5V load (similar to the "Mixed 3.3V and 12V High- and Low-Side Switching" example in the datasheet.

Title: LT1157 Logic Level Question


答: Ubuntu is a pretty common distribution so it should be pretty easy to work with.  However, Ubuntu is targeted for desktops, so I'd recommend using a light-weight flavor for the Beaglebone.  For example Xubuntu or Lubuntu.  But I also know that installation on a board like this can be a pain, so i'd try to find some standard image if possible.</p>

Title: language to code Beaglebone


答:
If you do have actual limbs that won't do continuous rotation, you can typically get away with "service loops".  Which is a fancy word for a loop of extra wire that still allows the joint to move through its range.  Putting hard stops in the joint help prevent wire breakage, but are not necessary.  You can even have the joint rotate past 360 degrees depending on how much extra wire you use.  But you should keep track of the joint position and limit rotation through software.  There are many ways to do service loops that are neat and tidy and don't have wire hanging all over.

To further have a clean look, you can also have a hollow shaft and pass the wires down the middle of the axis.  The wires can still twist up, but much less wire is required.

Other fancy ideas are optical slip rings.  Instead of mechanical brushes which can introduce electrical noise in the signals, these bridge the gap with IR light.  Of course this won't transfer power.  To transfer power, you can use inductive coupling.

I think most robots simply use service loops.  Because slip rings are expensive.  So they are only used where continuous rotation is needed.

Title: Passing power through a motor

Body:
How would one go about passing power through a motor?

Let's say we have some basic robot which has a motor that slowly spins a limb, on each end of that limb, there is a motor which again spins a limb. Because the first motor is always going to be spinning, any wires would twist and eventually break, so a wired approach wouldn't work. The same goes for the subsequent motors.

I know that dc motors use brushes to get past this, but how is this generally solved in engineering/robotics? This must be a problem that has come up before, and there must be a solution to it.

Any ideas? :)


问:
What Does the Sensitivity Function Mean?
I'm studying for a test in Automatic Control and I have some troubles understanding sensitivity functions and complementary sensitivity functions.

There's one assignment from an old exam that sais
"Someone suggests that you should reduce perturbations and measurement noise simultaneously. Explain why this is not possible."

The correct answer sais:
"Since the sensitivity and complementary sensitivity transfer functions add up to 1, i.e. $S+T=1$, one cannot improve both the output disturbance and measurement error suppression at the same time."

I don't really understand this answer and my textbook is not to much help either, so I would appreciate alot if someone could explain how they got to this answer? Also, is the sensitivity function always representing the perturbations in the system and the complementary sensitivity function the measurement noise? My textbook seem to imply this, but I'm really not sure if this is always true.

答:
The text is saying that system perturbations and measurement noise look identical to the controller. That is, a controller will react in the same fashion to both system perturbations and noise in the measurement. By increasing perturbation rejection, you also make the system  more susceptible to noise from your sensors.

The sensitivity function is the ability to reject system perturbations. The complementary sensitivity function is the ability to filter noise.

http://lorien.ncl.ac.uk/ming/robust/sensfunc.pdf


问:
How to charge a LiFePO4 battery?
From what I've seen, LiFePO4 batteries seem like one of the top battery choices for robotics applications. However, I've seen people mentioning that you can't use a charger for a different battery to charge these, but I haven't seen why. If I were to build my own setup to charge LiFePO4 batteries what would it specifically need to do? What kind of voltages or current rates does it need to supply to charge these?

More specifically, I was think about setting up a solar charger for these batteries. Is there any immediate reason why this is a bad solution? Such as, the battery needs to charge with a current above some amount for it to work properly?

If you're ambitious enough to provide an example along with your explanation, I'm specifically thinking of having 4 of these batteries with 2 pairs of 2 in series in parallel.

答:
This is one of those questions where if you have to ask, you shouldn't be doing it.  There are charge-monitoring boards available for these batteries, and for safety's sake you should be using them.  You can still use a solar charger or some other method, but the output of that power source should feed a charge circuit that was built specifically for LiFePO4 batteries.

You're not so much looking for a battery charger as you are a "battery manager".  You need something that will

prevent over-discharging (both current and voltage)

prevent over-charging (both current and voltage)

detect raised temperature (indicating some sort of failure)

actually charge the battery

Off-the-shelf LiFePO4 chargers accomplish the charging in 3 stages:

Supply constant current (correct amount is specific to battery model) until the cell voltage hits its maximum

Supply constant voltage until the charge current hits some minimum, usually related to the initial charge current.

Maintain the charge by lowering the voltage slightly, and making other adjustments (I'm not completely clear on this part)

This is more of a pure-EE project than a robotics project, so if you are dead-set on building this then you should consult a more electronics-centric resource.

Title: How to charge a LiFePO4 battery?


问:
Battery system for a robot with a RaspberryPi or microcontroller
I'm building a robot which is actually a rotating ball. All my circuitry will be inside this ball. I'm using a Raspberry Pi as the brains. Apart from Raspberry Pi, I've an H-bridge IC (L298N), a 6-axis Accelerometer + Gyroscope (MPU6050), and probably some more additional digital components. These will work with a 5V or 3.3V supply. Another set of components are electromechanical devices like a 9kg torque servo and 2 1000RPM DC motors.

Here are my questions:

Everything will work on battery. I can get a 3.3V and 5V supply from a 9V battery using L1117-3.3V and 7805 regulators respectively. I know that it's not at all reliable to share the power source of the control circuitry with high load devices like motors and servos. Should I have a dedicated separate supplies for electromechanical components and the control circuitry?

Servo will run on 6V supply and motor will run on a 12V supply. How should I go about this one? Again, separate batteries for servo and motors?

Can of this work on a single high capacity battery, somewhat like 10000mAh?

Here are some of my calculations:

Servo current (6V): at no load: ~450mA, at around 6kg load: ~800mA

Motor current (12V): at no load: ~500mA, at around 6kg load: ~950mA

RaspberryPi and other digital circuitry (5V + 3.3V): ~600mA (that includes an Xbee)

Thus, the overall current at a 6kg load (with two motors) comes around ~3.3A

It would be really awesome if this thing gets done with a maximum of 2 batteries. Else, it may get messy while placing the batteries inside the ball. Space is limited!

答:
You are right that there are issues in having an "unclean" power supply running into your RaspberryPi. If you are drawing tons of power, things get very hairy very fast. However, there are ways to "convert" and "clean" a supply to isolate the voltage (and therefore making it suitable for input to the Raspberry Pi). How much cleaning will depend on your specific motors and use case.

While you can use a single battery for everything, I would only recommend it if you have some very good switching DC to DC converters, as you'll lose a ton of power in the conversion otherwise. Most regulators (including the one you mention for the 3.3VDC) "burn off" the extra voltage to get the voltage you want. So, in your case of converting 12VDC to 6VDC and drawing on order of an amp would mean you would be burning 6 Watts (which would be converted to heat).

This is fine for electronics like the Raspberry Pi, but not so fine for powering motors.

My recommendation therefore is either 1) Get a High efficiency DC to DC switching converter or 2) Have two separate voltage supplies, +6VDC and +12VDC.

As far as powering the Raspberry Pi, there is a better solution:

Powering the Raspberry Pi

Unless you have specific electronics that need +5VDC, there is no advantage to supplying +5VDC to the Pi. Instead, I recommend directly powering +3.3VDC to the Pi via a Voltage regulator w/ some protection electronics. You can do this either by hacking the board, or by supplying +3.3VDC to both the +5VDC & +3.3VDC of the GPIO header (bypassing the on-board voltage regulator). Details on how to do so are here:

http://www.daveakerman.com/?page_id=1294

WARNING this puts your Raspberry Pi at risk if you don't do a good job conditioning your input power!! There are a myriad of ways to clean up power, but at a minimum you should look up "flyback diode" and plan to use one in conjunction to a largish capacitor for each motor driver.

Hope this helps...


问:
Accounting for error in multiple electric motors
Our goal is to drive an autonomous robot with a differential locomotion system using two identical electric motors and an Arduino Uno (1 for each wheel). From our understanding, over time the motors can lose accuracy and may result in one motor rotating more than the other.
Is there a way to account for possible error in the speeds of the motors so that the robot can end up in a very precise location?

Our thoughts were to have an indicator which would allow us to count the number of rotations of each motor and compensate if a noticeable difference began to appear.

答:
You're describing an encoder. It will give you a signal every time the wheel turns a some amount of degrees.

http://www.bot-thoughts.com/2011/03/avc-bot-wheel-encoders.html


答:
This is a classic robotics problem not only will motors not rotate at the same speed given the same power, but one wheel might slip more than the other. This is why you almost always see precise robots with some sort of external reference, be it a camera, gps, line sensor.

An encoder will tell you whenever the shaft you attach it to has moved x degrees where x is dependent on the encoder. https://en.wikipedia.org/wiki/Rotary_encoder be careful of the difference between an absolute encoder and a relative one.

Edit: apparently I am being down voted because you are all assuming robots are driven on hard surfaces. Most commercial grade robots are not http://www.popsci.com/disney-designs-robot-draw-pictures-sand http://www.irobot.com/For-the-Home/Vacuum-Cleaning/Roomba.aspx http://www.robomow.com/en-USA/ http://www.nasa.gov/mission_pages/msl/

Title: Accounting for error in multiple electric motors

Body:
Our goal is to drive an autonomous robot with a differential locomotion system using two identical electric motors and an Arduino Uno (1 for each wheel). From our understanding, over time the motors can lose accuracy and may result in one motor rotating more than the other.
Is there a way to account for possible error in the speeds of the motors so that the robot can end up in a very precise location?

Our thoughts were to have an indicator which would allow us to count the number of rotations of each motor and compensate if a noticeable difference began to appear.


问:
How do I achieve this? Grid of dowels powered by piston-like movement
I am completely new to this site and robotics, but I have experience in programming, and programming microcontrollers.

I would like to create a grid of "pixels", where each "pixel" is a metal or wooden dowel that is programmed to push in and out, like a piston.

I'm imagining a lot of pixels, maybe 40x40, where each could be quite small in diameter (1/4").  The Arduino would have control over the linear movement - up and down - of each pixel.

Could anyone point me in the right direction for accomplishing this?

答:
You may want to consider mastering the art of controlling an LED matrix first.   Then, replace the LED's with some sort of actuator (motor, servo, or other mechanism) at each node of the matrix that performs the up and down motion that you seek.

It sounds simple, but there are other details to consider.  Particularly, you'll probably need more power to drive the actuators than you would for LED's.  This, of course, depends on the actuators that you choose.

There are probably more factors to consider beyond what i've mentioned (e.g. Cost, precision, sensor feedback, etc...), but the first step would best be learning how to control an LED matrix.  I may even advise to look into using shift registers rather than multiplexing.

As for achieving vertical motion of the dowels with an actuator, there are a number of ways to do it.  The easiest may be using a rack and pinion or a closed loop pulley with an actuator attached at one end.


问:
Understanding the Bode Plot
I'm not sure if this is the correct forum for this question about Automatic Control, but I'll try to post it anyway.

So, I've just started to learn about Control Systems and I have some troubles understanding Bode plots. My textbook is really unstructured and the information I find on the Internet always seem a little bit too advanced for a beginner like me to grasp, so I hope you can help me to understand this.

I would like to know what the information we find in the Bode plot can tell us about how the corresponding step responses behave. I know that a low phase margin will give an oscillatory step response and that the crossover frequency decide the rise time. But how can we see if the step response has a statical error in the Bode plot and what does the phase graph of the Bode plot actually mean?

答:
Well to answer your question, I hope this correct, I won't consider myself as an expert:

Basically to see if there is a statical, you need the phase graph. Each differentiating element in the system will boost the final phase by 90°, each integrating element decrease the phase by 90°.

Just look at the highest frequency and take the phase, usually this value is a multiple of 90°.

If it's negative the system is allover integrating and there is no statical error.

Systems are usually represented with a complex frequency (The Laplace's "s"). You are allowed to substitude the s with j*omega, where omega is the frequency and j is the imaginary number.

Just insert your frequency and then a complex number remains. Complex numbers can be expressed in exponential form. This representation has a gain and an angle. This two values are plotted in the bode plots.

Title: Understanding the Bode Plot


问:
Dealing with position inaccuracy and latency in PID Loop
Background:
I am new to PID, for my first PID project I am using a simple P-Loop and 300 degree linear potentiometers for position feedback. I am using the roboclaw 2x60A motor controller.  The motor controller has 64 speeds between.  Sometimes the potentiometers can vary as much as +-4 degrees when not in motion.  I am using an Arduino mega with a 10bit ADC to control the motors.

My Question:
How can I filter or reduce the variance in the potentiometers?  In addition, it takes a certain amount of time for the motors to react to the command, and it seems to throw off the P loop.  How do I account for the latency, in my program?

Example:
For this example the P loop was run every 33-36 milliseconds.
I will tell the motor to go to 250 deg/sec, and it will go to 275 deg/sec, the P loop then reacts by lowering the value sent to the motor however the speed then increase to 400 deg/sec and then the P loop lowers the value again, then the speed will drop to 34 deg/sec.

Thanks so much for any help,
Joel

答:
Having only the proportional term of the PID regulator will most definitely leave you with oscillations. If you think about it, it's quite similar to a linear harmonic oscillator F=k*x (formula for spring motion). Adding a derivative term should damp out those oscillations. If after waiting for the system to stabilize you see it stabilized with some offset and not the value you've instructed it to, you'll need to add integral term as well in order to remove that constant error.

As for the shaky ground, try separating logic power supply from the motors' power supply, and using optocouplers where possible. It's a common problem.

Regards,
Damjan


答:
While others have provided you with proper solutions, there's also a cheap hack :)
You can use audio connectors (I've seen people use them for "persistence of vision" display applications):

Title: Passing power through a motor


问:
arduino -lcd screen has weird noise with multiple pictures
I'm connecting an arduino to a lcd screen using the following library. For the display code I have written a simple piece of code that should display 2 picture os eyes (1 angry one friendly) and switching at regular intervals, however the display keeps showing me weird pixels around the borders that shouldn't be there, by making it show the same eyes twice this can be fixed however as long as I have both eyes being used it runs into trouble. Here is my code: </p>

```<code>    void setup()
    {
      LCDA.initDriverPin(2,7,10);
      LCDA.Initialise(); // INIT SCREEN
      delay(100);
    }
    void loop(){
      LCDA.CLEAR(); //empty screen
      delay(100);//wait for command to finish

      LCDA.DrawFullScreen(eyes);
      delay(5000); //wait 5 seconds with eyes on the screen

      LCDA.CLEAR();//clear screen
      delay(100);//wait for command to finish
      LCDA.DrawFullScreen(angry); //show me the angry face
      delay(5000);//wait 5 seconds with angry face on screen
    }

/*------------------------------------------------------------------------------
; DFrobot bitmap - size 128x64 pixels, black/white image
------------------------------------------------------------------------------*/
unsigned char eyes[]={
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x02 ,0xE0 ,0x00 ,0x00 ,0x00 ,0xF8 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x1E ,0xF8 ,0x00 ,0x00 ,0x00 ,0xFE ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x3E ,0xF8 ,0x00 ,0x00 ,0x02 ,0xFE ,0x80 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xFE ,0xFC ,0x00 ,0x00 ,0x06 ,0xFE ,0xC0 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0xFE ,0xFE ,0x00 ,0x00 ,0x0E ,0xFE ,0xF0 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x02 ,0xFE ,0xFE ,0x00 ,0x00 ,0x0E ,0xFE ,0xF8 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 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 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
};
</code>```

<p>each time I re upload the image it changes the way the noise patterns look suggesting this is some kind of overflow problem. However changing the last byte of the bitmaps creates lines at the bottom of the screen, right where the noise is on one of the images. Note that with different images this noise can very much "cut" into the images even creating not active pixels (0's) rather then just set ones. Suggesting that the images themselves to at least fit the display. </p>

答: Because these pictures were saved in SRAM rather then in flash memory they took up so much space that the arduino ran out of memory causing various types of noise to appear(along side a few other problems such as random crashes/reboots). By moving them out of SRAM and into flash memory the problem was solved. </p>


答:
"Is there a way to account for possible error in the speeds of the motors so that the robot can end up in a very precise location?"

The other answers describe the approximate solution (encoders). It depends on what you define 'precise' as. For an Arduino budget project, it is probably precise enough. But typically, say you direct your Arduino robot to move in a 1 meter square, you can expect it to be off by several cm when it returns to the start point. That is usually fine for an Arduino robot, but imagine something 100 times bigger (a car) being off by 100 times as much, now you have problems.

This problem is overcome by adding additional sensors. Each one can add additional accuracy until required precision is reached.

A gyro helps by giving more accurate short term turning information, as encoders depends on mechanical solutions that have slippage.

A compass works by giving more long term heading information, but is subject to disturbances.

A GPS, if available, can provide periodic 'corrections' to overall location information.

A SLAM algorithm, often laser range finder based, can triangulate on detected objects to help improve accuracy.

Lately the use of images, especially stereo, can also provide triangulation information. This is often referred to as optical odometry.

All of these additional measurements, separate or in some combination, is 'fused'. Very often with some form of a Kalman filter. The filter helps prioritize which signals to use dynamically.


问:
Getting started with Jetson Tegra K1
After working for a long time on my Arduino Due, I needed a better and more powerful prototyping platform for my future projects. For which, I have placed an order for NVIDIA Jetson Tegra K1 board which runs on linux and supports CUDA based development. Being a newbie to Linux, I have no idea where to start from and what to do for getting started with code execution on the Jetson board. Please suggest the initial steps required and from where can I get familiar to Linux environment...

Thank you

答:
I would recommend looking into ROS. It's a communications protocol that allows for easy communication between two pieces of code. It works with python and cpp and handles all the  building and compiling. There are a ton of ROS libraries, called packages, which the community has put together and maintains.

It looks like ros indigo has been successfully built in using the jetson tk1.

http://wiki.ros.org/indigo/Installation/UbuntuARM

Here are some ros tutorials that cover all of the basics.

http://wiki.ros.org/ROS/Tutorials

Title: Getting started with Jetson Tegra K1


问:
How to combine an accelerometer and a gyroscope to find robot location and orientation in 2D/3D space
I have data from an accelerometer that measures X,Y,Z acceleration and data from a gyroscope that measure pitch, roll and yaw. How would I combine this data to find robot location and orientation in 2D or 3D space? </p>

答:
Look into nonlinear filters, particularly the unscented kalman filter (ukf). Using a ukf to fuse the data from a gyroscope and accelerometer will allow you to estimate orientation. However, these two sensors alone will not be capable of estimating position. You will need some sort of sensor that measures distance or position.

For information on the ukf, look into Probabilistic Robotics.

http://www.amazon.com/Probabilistic-Robotics-Intelligent-Autonomous-Agents/dp/0262201623/ref=sr_1_1?ie=UTF8&qid=1421178247&sr=8-1&keywords=probabilistic+robotics

Response to comment-

Imagine you are trying to estimate the position of a car that is traveling down a straight road. To estimate the position of the car, you are given a picture of the car's speedometer every second. You can get an idea of how far the car has traveled using this information but you will not know for certain. If there is any bias in the speedometer, your guess of the total distance traveled will be way off. To really know the car's position, you need to be able to measure it directly.


问:
Pose estimation, how to populate set of known edges and points?
I am building an estimator that solves for the camera pose relative to a reference frame which contains a known set of features and edges. Currently, the system works with an unscented kalman filter with four known points (red leds) in the reference frame. I am now hoping to improve robustness by adding edges to the model as well as robust features. I would like to add additional points that are uncovered by some opencv feature finding function (fast,cornerHarris,...).

So far I found the paper "Fusing Points and Lines for High Performance Tracking" and "Robust Extended Kalman Filtering For Camera Pose Tracking Using 2D to 3D Lines Correspondences" which seem to detail how to fuse edge and feature matching for pose estimation.

Is there a strategy to populate the known set of edges and features when it is impractical to measure them with a ruler/tape measure? My first thought is to start with a small known set of features, my red leds, then run some slam algorithm and keep all features/edges that have some minimum certainty.

Thanks a bunch!

I have misunderstood the RANSAC algorithm. This is not appropriate for my application.

For those interested, I am hoping to use a similar approach to the one presented in the following paper.

Youngrock Yoon, Akio Kosaka, Jae Byung Park and Avinash C. Kak. "A New Approach to the Use of Edge Extremities for Model-based Object Tracking." International Conference on Robotics and Automation, 2005.

答:
First some terminology, finding camera pose is known in computer vision as external camera calibration. Since you mentioned Kalman filter, I assume you need to need to "update" the so-called external parameters of the camera continously (i.e. the camera is moving).

If the camera moves in front of the reference frame you might use the usual chessboard pattern as a calibration rig. If however the camera moves about the reference frame, you might want to use other object and test robust feature detectors (like SIFT)  but you have to make sure your object doesn't have symmetrics that might lead to ambiguities..

In case you don't have control over the envionment, there are the so-called automatic calibraiton methods (see reference). The problem with this approach is that you have the assumption that the features you find in your envionment belongs to rigid bodies (on Mars you can make such assumption safely ;)

References:

SIFT http://en.wikipedia.org/wiki/Scale-invariant_feature_transform

OpenCV Camera Calibration http://docs.opencv.org/trunk/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html

Carrera et al, "SLAM-Based Automatic Extrinsic Calibration of a Multi-Camera Rig", 2011

Miksch et al, "Automatic Extrinsic Camera Self-Calibraiton Based on Homography and Epipolar Geometry", 2010


答:
I assume you are talking about a Bode plot of a transfer function response, which relates the input of a system to the output in the frequency domain. One way of measuring such a response would be to input a sinusoidal signal of one particular frequency, and measure the amplitude and phase shift of the output. So the input will have the following form,

$$
x_{in}(t) = A \sin(\omega t).
$$

The output will always also be a sinusoidal signal of the same frequency, assuming that the dynamics of the system are linear, so no $\dot{x}=x^2$, but possibly with a different amplitude and phase. So the output will have the following form,

$$
x_{out}(t) = B \sin(\omega t + \phi).
$$

The amplitude would actually be the ratio of $B/A$ and $\phi$ would be the phase shift.
There are more efficient ways of measuring a transfer function, however I think this helps explain the meaning of the Bode plot of a transfer function in the frequency domain.

Usually a logarithmic scale is used for the frequency axis of a Bode plot, just as the amplitude (usually with decibel). A linear scale usually used for the phase information. A transfer function usually expressed in complex values instead of amplitude and phase, since that information can also be extracted from complex numbers. When you want to find the response of a system, you can just multiply the transfer function by the frequency domain of the input signal (when you have amplitude and phase separate, you can multiply the amplitudes and add the phases).

The frequency domain of a step function has a constant nonzero amplitude and constant phase for all frequencies. If you would multiply this by the transfer function you would basically get the transfer function back (possibly scaled) as the frequency domain of the output signal. Since all sinusoidal signals oscillate around zero, therefore you can find the offset from zero (I assume you mean this by statical error) by looking at the amplitude of the output at 0 Hz.

Title: Understanding the Bode Plot

Body:
I'm not sure if this is the correct forum for this question about Automatic Control, but I'll try to post it anyway.

So, I've just started to learn about Control Systems and I have some troubles understanding Bode plots. My textbook is really unstructured and the information I find on the Internet always seem a little bit too advanced for a beginner like me to grasp, so I hope you can help me to understand this.

I would like to know what the information we find in the Bode plot can tell us about how the corresponding step responses behave. I know that a low phase margin will give an oscillatory step response and that the crossover frequency decide the rise time. But how can we see if the step response has a statical error in the Bode plot and what does the phase graph of the Bode plot actually mean?


问:
Basic programming in arducopter
I am starting with a project using Arducopter. I am a person familiar with arduino, but seeing the arducopter for the first time. Commands codes and everything is completly different compared to normal Arduino programming. I am not getting any help or commandlist for specific purposes in arducopter. Any body can help me in leading to any links which can help me out..</p>

答:
You should start with http://dev.ardupilot.com/
You can find articles that will make you familarize with code.

Alternatively you can look at Aeroquad(https://github.com/AeroQuad/AeroQuad) which runs quadcopter on Arduino

Title: Basic programming in arducopter


答:
Unfortunately I cannot comment.

You can, but it will most likely be very inaccurate.
If you use an accelerometer output to calculate displacement by double integration, any error will be compounding. Because you have no way to offset this error, over time it will become so large that the position value is meaningless.

The other issue is if you are moving at constant velocity the accelerometer will report 0m/s/s, so double integration with respect to time will give a displacement of 0, making the robot appear stationary.

Title: How to combine an accelerometer and a gyroscope to find robot location and orientation in 2D/3D space

Body: I have data from an accelerometer that measures X,Y,Z acceleration and data from a gyroscope that measure pitch, roll and yaw. How would I combine this data to find robot location and orientation in 2D or 3D space? </p>


问:
Can ROS run on a Raspberry Pi?
Can ROS run on a Raspberry Pi?

ROS is resigned to run on a network of machines, with different machines, even different cores on the same machine doing different jobs. Can one of those machines be a Raspberry Pi?

I am considering using an R-Pi as the EtherCAT master on a mobile robot, communicating with the main PC over WiFi, using a dongle.

Can an R-Pi even run ROS at all?

Would an R-Pi have enough processing power to do some 1kHz servoing?

Would it be possible to run some servoing on the host through the WiFi connecion?

答:
yes,

find the download here:

http://answers.ros.org/question/200504/raspbian-jessie-ros-indigo-download-image/

including framebuffer driver for C-Berry TFT display

Title: Can ROS run on a Raspberry Pi?


问:
ros send message on startup doesn't seem to work
I have the following code:

```<code>void NewCore::spin(){
    ros::Rate rate(10);

    int first =1;
    while(ros::ok()){

        if (first){
            askMath();first=0;}
        ros::spinOnce();
        rate.sleep();
    }
}

int main(int argc, char **argv){

    ros::init(argc, argv, "newCore");
    NewCore nc;
    nc.init();

    nc.spin();
}

void NewCore::init(){

    mngrSub = handle.subscribe<std_msgs::String>("/tawi/core/launch", 10, &NewCore::launchCallback, this);
    mngrPub = handle.advertise<std_msgs::String>("/tawi/core/launch", 100);

    mathSub = handle.subscribe<std_msgs::String>("/display", 10, &NewCore::launchCallback, this);
    serSub = handle.subscribe<std_msgs::String>("/tawi/arduino/serial", 100,&NewCore::serialCallback,this);
    mathPub = handle.advertise<std_msgs::String>("/questions", 100);

    ballPub = handle.advertise<std_msgs::Int16>("/tawi/core/ballcount", 100);
    nmbrPub = handle.advertise<std_msgs::Int16>("/tawi/core/number", 100);
}

void NewCore::askMath(){
    ROS_INFO("addition1d<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
    std_msgs::String question;
    question.data = "1digitAddition";
    mathPub.publish(question);
}
</code>```

(code that isn't interesting has been removed)

Running this causes the following output to appear:

```<code>$ rosrun glados newCore
[ INFO] [1421236273.617723131]: addition1d<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
</code>```

However if I have the following code on during launch:

```<code>$ rostopic echo /questions
</code>```

then it does not show me an initial message being sent.

Changing

```<code>        if (first){
            askMath();first=0;}
</code>```

into

```<code>            askMath();first=0;
</code>```

does appear to work but it then sends a message every cycle rather then just the one at the start.

Does anybody know what is wrong here?

答:
I experimented a bit and here's what I think happens.

When you run

```<code>$ rostopic echo /questions
</code>```

The /questions topic doesn't exist before you run the program. Maybe you cheat it by first running your programming, running this command and then running your program again, but this assertion is still true. So at the point when you run your program, rostopic is not subscribed to any topic.

I don't know internally how this is handled by roscore and rostopic, but somewhere along the line, this is what's happening as the observed behavior of rostopic:

```<code>forever

    /* establish connection */
    while not subscribed to topic
        try to subscribe
        if failed
            sleep a bit

    /* intercept messages */
    while topic still exists
        wait for message
        print message
</code>```

This means that rostopic (or more likely roscore on its behalf) waits for a topic to become available and subscribes to it.  It then proceeds to print incoming messages.  If the topic becomes unavailable, rostopic (or again more likely roscore on its behalf) goes back to waiting for the topic to become available again.

That said, here's what happens when this runs in parallel with your code:

```<code>    rostopic                       you

  wait for topic
      sleep

  wait for topic
      sleep

                                  start
                                ros::init
                             advertise topic
                          publish first message

subscribe to topic
 wait for message
      sleep
</code>```

As you can see, your program publishes its first message immediately after advertising the topic. The unsuspecting rostopic program is not yet aware of this advertisement so is not actually subscribed to the topic yet. You publish the first message before rostopic gets a chance to subscribe to the topic.

You can verify this simply by putting a relatively large sleep after you advertise the topics and before you publish to them, i.e. between nc.init() and nc.spin().

To address your real problem (as stated and responded in the comments), which is to understand when the node has started up and use this as a trigger for further actions, I'd advise to consider another strategy.

Generally, you would want to make sure a node is up to make sure the other nodes that depend on it can run correctly. However, this doesn't mean that the original node has to be run just before the depending nodes. It could in theory be run long before them, or since ROS doesn't run in real-time and as you have observed, the timing between when topics are advertised, subscribed and the messages going around are quite unpredictable. Add network to this and they are really unpredictable.

So instead, you could devise a mechanism to query whether your node is available or not. This is simply done with a ROS service. You would essentially do all the necessary startup and then put up a service that always returns true. Any node that needs to ensure this node is available before proceeding can poll this service and as soon as a call to this service succeeds, you know the node is running.

As an added bonus, this means that you don't have to take this node down (and all depending nodes) just because you need to restart one of the depending nodes.

Body:
I experimented a bit and here's what I think happens.

When you run

$ rostopic echo /questions

The /questions topic doesn't exist before you run the program. Maybe you cheat it by first running your programming, running this command and then running your program again, but this assertion is still true. So at the point when you run your program, rostopic is not subscribed to any topic.

I don't know internally how this is handled by roscore and rostopic, but somewhere along the line, this is what's happening as the observed behavior of rostopic:

forever

    /* establish connection */
    while not subscribed to topic
        try to subscribe
        if failed
            sleep a bit

    /* intercept messages */
    while topic still exists
        wait for message
        print message

This means that rostopic (or more likely roscore on its behalf) waits for a topic to become available and subscribes to it.  It then proceeds to print incoming messages.  If the topic becomes unavailable, rostopic (or again more likely roscore on its behalf) goes back to waiting for the topic to become available again.

That said, here's what happens when this runs in parallel with your code:

    rostopic                       you

  wait for topic
      sleep

  wait for topic
      sleep

                                  start
                                ros::init
                             advertise topic
                          publish first message

subscribe to topic
 wait for message
      sleep

As you can see, your program publishes its first message immediately after advertising the topic. The unsuspecting rostopic program is not yet aware of this advertisement so is not actually subscribed to the topic yet. You publish the first message before rostopic gets a chance to subscribe to the topic.

You can verify this simply by putting a relatively large sleep after you advertise the topics and before you publish to them, i.e. between nc.init() and nc.spin().

To address your real problem (as stated and responded in the comments), which is to understand when the node has started up and use this as a trigger for further actions, I'd advise to consider another strategy.

Generally, you would want to make sure a node is up to make sure the other nodes that depend on it can run correctly. However, this doesn't mean that the original node has to be run just before the depending nodes. It could in theory be run long before them, or since ROS doesn't run in real-time and as you have observed, the timing between when topics are advertised, subscribed and the messages going around are quite unpredictable. Add network to this and they are really unpredictable.

So instead, you could devise a mechanism to query whether your node is available or not. This is simply done with a ROS service. You would essentially do all the necessary startup and then put up a service that always returns true. Any node that needs to ensure this node is available before proceeding can poll this service and as soon as a call to this service succeeds, you know the node is running.

As an added bonus, this means that you don't have to take this node down (and all depending nodes) just because you need to restart one of the depending nodes.


问:
I want to control a sewing machine motor; need help with choices
I've got an industrial sewing machine (think "can sew with thread that looks like string, and has no trouble pounding through 20 layers of Sunbrella fabric"); it's got a 1 HP motor to power it. (I've got a smaller machine as well, w/ a 1/2 or 3/4 HP motor, which I might work on first.) The motor is a "clutch motor" which is always on, and a foot-pedal engages a clutch, so unless you "slip the clutch", you're basically always sewing fast or stopped. I'd like better control. In particular, I'd like to

Be able to stop with the needle "up"

Be able to stop with the needle "buried" (i.e., most of the way down)

Be able to press a button to move forward exactly one stitch

Be able to adjust -- probably with a knob -- the top speed of the motor

Have the motor off when I'm not actually sewing

The 1 HP motor is probably overkill for what I'm doing. I don't suppose I've ever used more than about 1/4 HP even on the toughest jobs.

I'd appreciate any comments on my thinking so far:

From what I've read, it looks as if a DC motor is the way to go (max torque at zero speed, which is nice for that initial "punch through the material" thing, and the ability to "brake" by shorting the + and - terminals). Brushless would be nice...but expensive. And I have a nice DC treadmill motor, and if I drive it at about 12-24V, it'll give me more or less the right speed; adjusting pulleys will do the rest. Such DC motors are powered (in electric lawnmowers, for instance) by running AC through a diode bridge rectifier to produce pulsating DC, and I've got such a bridge rectifier handy. I also have an old autotransformer that I can use to get 24VAC pretty easily. Thus I can get 24V pulsating DC to drive the thing ... but that may or may not be a good idea.

I've also got an Arduino and the skills to program it, and several years of electronics tinkering, and some RC experience...but no experience handling larger DC motors like this one. I've been told the magic words "H-bridge", and found this motor driver which certainly seems as if it'll allow me to turn on/off the motor, and regulate the voltage going to the motor. I don't know whether, when presented with pulsating DC at the input, it'll still work. Any thoughts on this?

I also can't tell -- there doesn't seem to be a handy datasheet or instruction page -- whether this thing can do braking.

For position sensing, there are lots of places I can get information -- either from the needle baror the handwheel of the sewing machine, so I'm not too concerned about that part. To give a sense of the problem, a typical stitching speed is something like 1000 stiches per minute, so if I'm just sensing whether the needle is in the top 1/4 of its travels or the bottom quarter, we're talking about something on the order of 10-50Hz, which doesn't sound like a challenging control scenario.

I guess my questions are these:

Will pulsating DC work with a controller like the one I've cited?

Would I be better off with an RC motor-controller? I can't seem to find one designed for the 24V range that can handle 50 amps, unless it's for a brushless motor, which I don't have. And I think that I want one that has braking ability as well. And I worry that with an RC controller, the software in the controller may prevent me from making the motor stop at a particular position.

Any comments/suggestions appreciated. (BTW, I'm happy with mathematics and with reading data sheets, and I've read (a few years ago) about half of "The Art of Electronics", just so you have an idea of the level of answer that's appropriate.)

To answer @jwpat's questions:

I got my voltage value by saying that the motor is rated for (I think) 130V, and is 2.5HP (yikes), but turns at something like 6700 RPM. (Here's one that looks just like mine).  Dividing by 5 or 6, I got "about 24 V" to give me about 1400 RPM. (I'm at the office; the motor's at home, so I can't tell you the exact part number, alas.) I honestly don't think that the no-load vs load condition is a big deal, because I can wangle a factor of 2 with pulleys.

The sewing machine is a Juki 562

Current motor/clutch are similar to this

Sorry for the lack of detail here,

答:
I can't comment due to reputation but if you go to page 11/38 of http://www.st.com/web/en/resource/technical/document/datasheet/CD00268302.pdf you can see how to free wheel(break).

The chip is rated to 28V at 8.9A, but those are ratings in perfect conditions, you are probably pretty safe to go to 28V but because the board you mention is not heat synced I doubt it can support more than 5A.

A large motor with a large load may not run at half voltage full duty cycle (half power).

Since the module is rated to 270W and 1 hp = 745.699872 watts that module is hugely under powered for a 1hp motor.

My experience is that motor power is not particularly linear so "Dividing by 5 or 6, I got "about 24 V" to give me about 1400 RPM. " is not a really valid way of doing it.

Tl;dr. I would buy a much much large H-bridge. For that much power you will probably have to go to discrete MOSFETS and a H-bridge controller.


答:
This thread might also be helpful:
http://answers.ros.org/question/9665/test-for-when-a-rospy-publisher-become-available/

The question is specifically about python, but i think the root cause is ROS specific, not language specific.

Title: ros send message on startup doesn't seem to work

Body:
I have the following code:

```<code>void NewCore::spin(){
    ros::Rate rate(10);

    int first =1;
    while(ros::ok()){

        if (first){
            askMath();first=0;}
        ros::spinOnce();
        rate.sleep();
    }
}

int main(int argc, char **argv){

    ros::init(argc, argv, "newCore");
    NewCore nc;
    nc.init();

    nc.spin();
}

void NewCore::init(){

    mngrSub = handle.subscribe<std_msgs::String>("/tawi/core/launch", 10, &NewCore::launchCallback, this);
    mngrPub = handle.advertise<std_msgs::String>("/tawi/core/launch", 100);

    mathSub = handle.subscribe<std_msgs::String>("/display", 10, &NewCore::launchCallback, this);
    serSub = handle.subscribe<std_msgs::String>("/tawi/arduino/serial", 100,&NewCore::serialCallback,this);
    mathPub = handle.advertise<std_msgs::String>("/questions", 100);

    ballPub = handle.advertise<std_msgs::Int16>("/tawi/core/ballcount", 100);
    nmbrPub = handle.advertise<std_msgs::Int16>("/tawi/core/number", 100);
}

void NewCore::askMath(){
    ROS_INFO("addition1d<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
    std_msgs::String question;
    question.data = "1digitAddition";
    mathPub.publish(question);
}
</code>```

(code that isn't interesting has been removed)

Running this causes the following output to appear:

```<code>$ rosrun glados newCore
[ INFO] [1421236273.617723131]: addition1d<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
</code>```

However if I have the following code on during launch:

```<code>$ rostopic echo /questions
</code>```

then it does not show me an initial message being sent.

Changing

```<code>        if (first){
            askMath();first=0;}
</code>```

into

```<code>            askMath();first=0;
</code>```

does appear to work but it then sends a message every cycle rather then just the one at the start.

Does anybody know what is wrong here?


问:
Will turning an NXT motor by hand damage it?
I have heard a lot of claims that manually turning an NXT motor by hand can potentially damage it. I was wondering whether this was at least partially true, and whether there is any evidence to confirm or refute this idea.

I know that some projects (e.g. etch-a-sketch) use the built-in rotation sensor to measure how much the motor has turned, so I was thinking that perhaps whether the motor is idle or set on break is an important distinction, or perhaps there is even a special 'rotation sensor' mode that needs to be switched on in order to prevent damage.

答:
In general, no, it will not hurt the motor directly, BUT, the motor is geared down considerably. This means that when you turn the exterior part that you can physically touch by 1/4 turn - the motor might have actually completed 5 full rotations. The problem can happen when you turn the servo too fast, it may cause gear breakage simply due to excess speed internally.

It does not hurt the motor, but it may break a gear. Simple solution is to just not turn it fast.

If the motor is set on 'brake', it will apply opposite power to counter your turns, but you're not going to really hurt anything by over powering it, slowly! It is easier to turn if the motor is not in brake mode.

For example, in RobotC, this code releases the 'brake'

```<code>// release motors
    nSyncedMotors = synchNone;
    bFloatDuringInactiveMotorPWM = true;
    nMotorPIDSpeedCtrl[LEFT] = mtrNoReg;
    nMotorPIDSpeedCtrl[RIGHT] = mtrNoReg;
    motor[LEFT] = 0;
    motor[RIGHT] = 0;
</code>```

ContentLicense: CC BY-SA 4.0

Body:
In general, no, it will not hurt the motor directly, BUT, the motor is geared down considerably. This means that when you turn the exterior part that you can physically touch by 1/4 turn - the motor might have actually completed 5 full rotations. The problem can happen when you turn the servo too fast, it may cause gear breakage simply due to excess speed internally.

It does not hurt the motor, but it may break a gear. Simple solution is to just not turn it fast.

If the motor is set on 'brake', it will apply opposite power to counter your turns, but you're not going to really hurt anything by over powering it, slowly! It is easier to turn if the motor is not in brake mode.

For example, in RobotC, this code releases the 'brake'

// release motors
    nSyncedMotors = synchNone;
    bFloatDuringInactiveMotorPWM = true;
    nMotorPIDSpeedCtrl[LEFT] = mtrNoReg;
    nMotorPIDSpeedCtrl[RIGHT] = mtrNoReg;
    motor[LEFT] = 0;
    motor[RIGHT] = 0;


答:
Here's a pretty good overview of what holmeski is saying, and using multiple sensors in general for different applications.

FWIW DARPA is, and has been looking into inertial sensors with enough precision to get useful positional tracking. It's called "Micro-PNT" for "position navigation and timing" and the idea is to not need a GPS.

Also, here's some more info directly from the DARPA site.

Quoting,

"The micro-PNT initiatives seek to increase the dynamic range of inertial sensors, reduce long-term drift in clocks and inertial sensors, and to develop miniature chips providing position, orientation, and time information. "

The bottom line general answer is, current inertial sensors generate too much uncertainty to be used standalone, and sensor fusion has it's own set of limitations.


答:
Its possible.

I did the same in my graduation project. What you need is:

Controlled movement over your machine, that you can command the machine to move 1 meter forward or 50cm back etc.

You need to train your system to learn from accelerometer data according to those controlled movements.

Train on different surfaces and also calculate the time elapsed in one particular move.

After some training your machine will understand that what does it means to move 1 meter forward or backward.

Believe me, it works like magic. My project was 3D semantic analysis and map reconstruction using autonomous agents, and I have not used GPS at all. I hope this will help you and somehow will also motivate you because its possible. :-)


问:
PCB making at home
I've made many PCBs at home but still there are some mistakes. I tried ironing, drawing methods but it doesn't work very well. I use eagle CAD for design PCBs. Please help me. </p>

答:
A slightly better method for home-made PCBs is to mill the copper off of a two sided PCB.  Google pcb milling for many machines and services.

Another crazy idea that will probably get more affordable in the coming years is to use a 3D printer that can extrude conductive and non-conductive materials.

Title: PCB making at home