问:
Steering using different speeds in DC motors or using a servo?
I am trying to assess the pros and cons of steering a robot car using different speeds of 2 or more DC motors versus using a servo and a steering mechanism? From your experience which is better in terms of:

Steering accuracy (e.g. prompt responsiveness or skidding while on higher speeds)

Efficiency in electrical power consumption

Durability and maintenance

Control complexity (coding and electronics)

I researched and understood how both approaches work, but I need some practical insight to select the most suitable approach. Any hint or research direction is appreciated.

答:
I have been working on upgrading an autonomous robot as part of a university project for the past year. As part of my work I have been switching the old skid steering system to a new active steering one, so have some experience with both methods.

Steering accuracy

Skid steering: Fairly good, need to use a PID loop to keep an accurate heading using a compass.

Active steering: Depends on how you are controlling it, if controlling it manually then it will be much worse than skid steering for accurate turning. When used with a control system, assuming you have some way of measuring steering angle and motor speed, it will be much more efficient, probably slower, but more accurate at keeping a heading without the need for a PID loop and compass

Efficiency in electrical power consumption

Skid steering: Not very good, you waste a huge amount of power every time you need to turn or correct your direction while moving. Most power is wasted when the wheels are skidding as it takes a lot of power to do so.

Active steering: Fairly good, since the motors are never fighting themselves it is much more efficient, although you do have to take into account the actuators doing the steering.

Durability and maintenance

Skid steering: Very Robust if mechanics are done properly, the skidding puts huge loads on the axles and motors, so much sure they are up to scratch.
Maintenance is mostly making sure the tires haven't completely worn through from all the skidding!

Active steering: In my experience the added complexity leads to a huge amount that can go wrong, but again if the mechanism is well designed and components over-specced appropriately then it can be just as good as skid steering. It depends a lot on how exactly you’re doing the steering - the robot I’ve been working on has steering on the same wheels that are motorised, as well as suspension, so the mechanism is fairly complex (ball joints, double-wishbone suspension etc.) For maintenance you need to check a much larger number of parts and keep the mechanics in good shape.

Control complexity (coding and electronics)

Skid steering: Very easy, both forward to go forward, opposite directions to turn, slow down one side to turn while moving forwards. Best manual control, but does require a PID loop and compass for holding an accurate direction when used with a control system. For drive electronics you just need motor drivers for each wheel, relative power levels are normally sufficient for steering.

Active steering: Insanely complex or easier than skid steering (depending on how you are controlling the robot!) If you are remotely controlling it and can have controls for steering angle and motor speed then it is very simple, although skid steering is still easier to drive manually. However if you want to control the steering with software and do path planning etc, it adds a lot of complexity to the control system. What angle do you turn the wheels? How fast do you turn each wheel for a given steering angle?
For drive electronics you will need a way of controlling your steering actuator and a way of knowing what position it is in. You also need to know the speed of each motor so you can control the exact speed of each one (depending on how beefy the mechanics are this might not be necessary). For the robot I am working on if you drive the motors at the wrong speeds then it will probably rip the wishbones right off the robot!

Summary

Skid steering:

Simple mechanics

Simple control (both manual and autonomous)

Easy to construct with good durability

Inefficient power-usage

Active steering:

Possibly complex mechanics

Simple control only with steering angle feedback

Lots of component probably required, so lots of maintenance

Can be more efficient

While active steering is certainly more impressive when it works properly, it’s a lot harder to achieve with the control system alone being insanely complex. In retrospect to my own projects, I wouldn’t recommend active steering unless it’s absolutely necessary.

I would however suggest some investigation into holonomic robotics. These use special wheels to allow movement in all available degrees of freedom in 2D space with the same mechanics as a skid-steering robot.

Here are some photos of the old and new robots:
Tiberius 2 - Skid steering

Tiberius 3 - Fully independent suspension and steering


问:
Stereo Vision Using Compute Module: Pi camera synchronization
Good day,

I am currently working on an obstacle avoiding UAV using stereo vision to obtain depth maps. I noticed that the quadcopter would sometimes not steer to the correct direction.

I am using the Raspberry Pi Compute Module IO board which comes with two CSI ports used with two v1 Pi Cameras.

Issue

I soon found out that due to the latency between the cameras, the left and the right images are not in sync thus the errors in the depth map result.

Steps taken:

I noticed the image blur when moving the cameras around so I adjusted the shutter speed by setting the UV4l/raspicam driver. With the shutter speed, I also tried to increase the framerate as I've read, it improves the latency issue. In my code which uses the opencv library, I used the grab() and retrieve() commands to replace the read() command so that the frames from both cameras is grabbed at the nearest time possible however it didn't help much.

Does anyone know any possible solutions?

答:
You need real camera synchronization which means using cameras that both have external trigger capability (it is like the "remote shutter" on consumer/DSLRs). What you do is feed a common trigger signal to both cameras and sync them like that down to the sub-ms level (the accuracy largely depends on the camera HW but is usually very good, usually in us).

Frame synchronization is not implemented on the RPi camera so you can not sync two cameras for stereo (even though the v1 cam OmniVision sensor had a FREX pin which was kind of external trigger - but it was neither routed out of the sensor to the camera board nor implemented in the camera driver). What you are trying to do is is SW sync both raspi cams but both modules are in "free running" mode (they are streaming images at given FPS each continuously) and OpenCV only grabs the last frame that was taken which is far from being synchronous capture. Your frame offset may be as high as the frame rate is, but even at 90 FPS you still have some 10 ms difference which most likely is unacceptable for an UAV application.

Should you have a static environment you would not need to sync the cameras at all, but you seem to know this :). There were community attempts to frame sync the raspi cam, search for "frame synchronization" on the raspberrypi.org forum if you are interested.

If you ask for a low cost camera with external trigger - they cost about 300 USD from Point Grey - these are scientific USB cameras. The lowest cost I found is a See3CAM_10CUG from e-con Systems which starts at about $150.

ContentLicense: CC BY-SA 3.0


问:
What is the thread/screw size for the iRobot Create 2 internal screw bosses described in the Open Interface Spec doc
In the “iRobot_Roomba_600_Open_Interface_Spec.pdf” provided for the iRobot Create 2, there is a section titled “Roomba Internal Screw Boss Locations”.  It states that “Screws may be replaced with threaded standoffs.”

Does anyone know what screw/thread size of standoffs should be used to match the screw threads?

(I saw another similar thread but the only solution listed was to re-thread the holes, which I would like to avoid if at all possible.)

Thanks!

答: If it says it can be replaced with "threaded standoffs" then it is probably referring to the same kind of threaded standoffs used in computer cases, so probably 6-32 (most likely) or M3. </p>


答:
Automotive style steering can actually be simple.  The conventional car has just one motor that powers two rear non-steering wheels through a differential.  The differential solves the problem of how to compute a speed for each wheel.  The front wheels are not powered so we don't have to compute their speed.  Ackerman Steering moves the front wheels so that they are not parallel but have the extended axles of all four wheels meet at a common point.  The car drives around this point so path planning is easy except in tight quarters.

The problem with automotive steering is that it is best suited for use by cars on roadways.  It is not symmetric forward and backward and getting to some locations and orientations is very hard (try parallel parking a normal car)

Automotive type steering is not complex but some path planning can be.  (for example "move left one foot" requires some back and forth motion)

At the other end of the spectrum is four wheel independent steering where each wheel has both a drive motor and a steering motor.  This machine can spin in place and drive in any direction.

A related problem is suspension.  Its first goal is to keep all four wheel in contact with the ground.  Another possible goal for higher speeds is absorbing impacts

Before you can decide what to build you need to think about the kind of TERRAIN the robot will drive over and the SPEED and also the MASS of the robot.

Title: Steering using different speeds in DC motors or using a servo?

Body:
I am trying to assess the pros and cons of steering a robot car using different speeds of 2 or more DC motors versus using a servo and a steering mechanism? From your experience which is better in terms of:

Steering accuracy (e.g. prompt responsiveness or skidding while on higher speeds)

Efficiency in electrical power consumption

Durability and maintenance

Control complexity (coding and electronics)

I researched and understood how both approaches work, but I need some practical insight to select the most suitable approach. Any hint or research direction is appreciated.


问:
Connecting multiple different voltage servos to the same controller
I am using the Pololu Micro Serial Servo Controller connected to an Arduino and multiple other servos (4 total) to make a robot arm.  Two of the four servos require 4-6 volts, while the other 2 require 7-10 volts, so I am planning on powering all the servos separate from the Pololu.

I have the Arduino and Pololu connecting to each other correctly (flashing green led), but the servo(s) don't move when plugged in to the control pins.  All the servos work correctly when plugged into a servo-tester.

I think that this problem could be fixed by connecting the grounds of the servos to the ground of the Pololu, but would like advice because I am not sure if it will work, or will end up frying one of the parts (We already fried a pololu).

Would connecting the grounds of the batteries to the ground of the Pololu help, or damage the parts?

, but I couldn't figure out how to show the micro serial servo controller.

答:
You have a floating signal of servo ctrl, because they are not on the same common.
Output from arduino (if not on the same common as servo) will be on the different potential level than input on servos. So servo will see it as a floating potential between his ground and his vcc potential.
(i hope you did understand what i wanted to say, its hard for me to explain it on English :) )

I guess your diagram is not connected like you have posted, because you have connected +5 and gnd from arduino to digital 3 and inputs from both servos are connected.


问:
Selecting a gear reduction: torque vs speed
I have just sized the DC motors I want to use (corresponding to my robot and its intended applications - my figures include a 50% uncertainty factor to account for friction in reducers and other losses). Now I need to actually choose the exact motors I want to buy from the manufacturer (I am targeting maxon motors as I am not an expert and want no problem). I have a few down to earth questions about linking the mechanical needs to the electrical characteristics, among them:

Question #4:

The motor I chose (maxon brushed DC: 310005 found here) has nominal speed = 7630rpm - nominal torque = 51.6mNm. My needs are max speed = 50.42rpm / max torque = 10620 mNm. This means a reduction factor of 151 for speed and 206 for torque. Should I choose a gear closer to 151 or 206?

答:
You have to select the motor for the worst case.  (Assuming you cannot change your specification) it just may turn out that you have excess of speed or an excess of torque.   In your example you have selected a motor that only handles the best case.  You need a larger motor.  (or to reduce your specification or to reduce your safety factor.)

My preference would be to have available more torque than required by specification as you really should NEVER stall a motor.


问:
Sun tracking with +/- 0.1degree accuracy?
For a school project I am looking to track the sun with +/- 0.1 degree accuracy for use with a parabolic dish reflector. Say we need a final output torque of about 20Nm, what kind of gearing/motors and feedback would you guys use to accomplish this? The sun position will be found with a solar positioning algorithm.

I am pretty new to this all but from my research stepper motors seem the easiest but brushless DC motors, from what I have read, can yield better results with smoother tracking. I am confused how you even use regular brushless dc motors to achieve precision positioning. I am aware of encoders but I don't really understand why the BLDC are preferred for this particular application, and how one would implement them.. Any ideas that can help kick start my researching?

答:
You have the same exact problem that all astronomical telescope drives have.  The easiest solution is to align your axis so that one of them is EXACTLY parallel  to the Earth's pole.  Now  you only need one motor to track the sun as it moves.

The second motor needs only a small range of motion and only needs to move a tiny bit every day and then it can "put on the brakes" literally to keep this axis from moving.  We call this the declination axis

This type of drive moves in something like a latitude and longitude coordinate system.  They are spherical not cartesian and it make tracking the sun very simple. So simple you don't need computer control.

The large motor needs to rotate about one revolution per day.  The smaller motor makes a few degrees of motion per year and then reverses.  It is mostly stationary.

You are in fact building a CLOCK and in fact in these these drives were called "clock drives" because SPEED is the thing you need to control not position.  The sun goes not move randomly.   A hundred years ago, before electronics were available, they used springs and pendulums to regulate the speed, just like you'd see in a large clock.

typically the axis that is parallel with Earth's pole called the "polar axis" is tilted to match your latitude is fitted with a large worm gear.  Get the largest and best one you can afford.  The pinion that drives this worm uses a motor that can be very accurately speed controlled.  It will need an encoder on the motor shaft to measure speed.  You will need a feedback loop to keep the speed constant as the mechanical load changes.

In any case think more about controlling exact SPEED as this drive will move very slowly and must not do so in steps or you will have huge vibration problems.  If the mass of the load is high you MUST move it continuously not in anything like small steps.

One other thing:  You seem to want to move this "open loop".  But why not try and track the sun with some kind of sensor?  All you need is a small tube with both ends closed.  Face one end approximately at the sun and make a tiny pinhole in the sun facing cover.  this will project a tiny dot of light on the other cover.  control the speed of your polar axis drive motor so as to keep the projected dot from moving.  Someone suggested placing an encoder on the shaft, no need when your target is so bright and easy to track.

Problems you will face:  (1) your axis is not perfectly aligned with the Earth's axis.  This means that for sure you can not use an open lop drive and WILL need to track the Sun optically.   This is another reason not to depend on a shaft mounted encoder.  Also I lied about the declination motor being able to clamp on the brakes.  That only works in the axis are perfect.  It will not be perfect.

You will have these problems but even worse it you try to build an "X, Y" type drive where one axis is vertical and the other horizontal.   You will find that your two axis are not at exactly 90 degrees and they are not pointing where you think they are. You will have to track the sun with a sun sensor less you spend a LOT of money building a very rigid and precise mechanical system

the good news is that this is a well known problem and there are many ways to go.  Computers make it cheaper then in the last century because we can build a cheap sun tracker to compensate for the faults of a less then perfect mechanical system.


问:
What kind of torque is needed for a small 5-6 axis robotic arm?
I'm new to robotics and I'm looking to make a 5-6 axis robotic arm out of stepper motors but I honestly don't know how much torque I should have for each part. Below I have described in more detail what my current plan is but I'm really not sure as to how much I really should be spending on each of these joints.

My general plan for this project was to make a arm that when fully extended would only be around 40-50(max) cm long. It would be consisted of light weight aluminum and I am hoping for it to weigh only a couple of pounds when done.

Here is my current list of actuators for each of the joints:

(Bottom = 1, Top = 6)

1st joint, (Nema 23 CNC Stepper Motor 2.8A)

2nd and 3rd joints

4th, 5th and 6th joints

My real questions is, is this overkill or is it not enough for what I'm really trying to make. I really don't need it to be able to pick up a lot of weight, at most 1 to 2 kilos but I highly doubt I will ever be picking up anything more than that. Anyway I just wanted to see if this was sufficient enough for my project.

答:
Likely you will need to use some kind of gear reduction to multiply the torque and reduce the speed.

But to answer your question the way you work this out is one link at a time.  The fact that your arm is 5 DOF does not matter.  The link and joint farthest from the base is a 1 DOF robot.  Find the worst case which is likely with the link horizontal and holding the maximum weight in the gripper.   To find the static torque find the "lever arm" which is the distance from the center of mass to the joint.  Multiply this distance times the weight.

Then do the above again you next link and joint is another 1 DOF robot that is holding the fist robot at the end of the link

When yu finish you will know the torque required for a non-moving or very slowly moving 5 DOF robot arm.  Next you compute the torque required to accelerate each 1DOF robot and ad this to the above

After you are done you need to multiply buy a safety factor.  Just double all the torques to account for friction and other losses and because you can not drive the motors at full rated power for long

You will find that you can't do this without some kind of gear reduction. likely quite a high reduction.  Gearing can help in two ways
(1) the torque is multiplied by the reduction ratio.  so you can get LOTS more torque from a smaller motor and
(2) the motor can be located closer to the base by use of belt drives or gears reducing the torque requirement of the next motor.  In other words:  Every link has a motor mounted to it.  the motor can be mounted any place in the link but you prefer to mount it nearest the "base"


问:
Differential Drive Robot on uneven surfaces
So I am building a differential drive robot and I want it to autonomously drive in a straight line on an uneven surface. I know I need a position and velocity PID. As of now, I am deciding on which sensors to buy. Should I use optical encoders, accelerometers, or something else?

I wanted to go with accelerometers due to the error encoders would face due to slippage, but I am not sure.

Some enlightenment would help!

答:
You will need BOTH.  Use encoder sensors on the wheels one for each side.  These will allow a PID controller to maintain wheel speed even with the variable mechanical loads on an uneven terrain.

The heading sensor (IMU) will need gyros too and maybe a magnetic compass to correct for drift in the gyros.  You will need a PID controllerl that looks at the difference between commanded heading and the heading as measured by the IMU this PID will adjust the target speeds of the two wheel PIDs


问:
Question about what motor to use for opening window
first off, just to be transparent, I'm a total newbie when it comes to DC motors (and pretty much anything robotic).

I've got a couch that's right up to a window with the lever type openings (anderson windows). With the couch, I have no clearance to turn the lever to open it. Given I've replaced most of my house switches/outlets with home automatable ones, I figured I'd see if I can build myself a small motor that I can automate to open these also. To be absolutely honest, I've got no clue where to start. I have no problem with coding the automation part, but I don't even know what kind of motors to look for that would be able to turn my knob (or rather how to actuate the thing my knob connects to)...

Help!

Thanks :)

答:
The standard way to control a window in the industry is actually with a linear chain actuator. I am in the construction business, and linear chain actuators are often used to control skylights. They are easy to set a repeatable distance, typically have a pin at the end with can disconnect the window from the system easily, and are time proven in the field.

DC motors would require a feedback loop, which I think is overkill for this, not to mention that casement style windows like this require a fair amount of torque, so a dc motor this size might get a little on the heavy/expensive side.

Steppers would work well, except for the fact that they can skip steps, and are somewhat loud.

You may be able to adapt an electric skylight opener. Also look into installing a rain sensor, that will close the window if it detects moisture.


问:
Finding rotation quaternion
I am trying to use a quaternions for robotics and there is one thing I don't understand about it. Most likely because I don't understand how to define position with quaternions and how to define rotation with quaternions if there is any difference..

Please watch my "understanding steps" and correct if I am wrong somewhere.

Lets assume I we have 2 vehicle positions described by 2 rotation quaternions:
$$
q_1 = w_1 + x_1i + y_1j +z_1k = \cos(\pi/4) + \sin(\pi/4)i
$$
This quaternion is normalized and represents rotation over the $x$ axis for $\pi/2$ angle as I understand it.
$$
q_2 = w_2 + x_2i + y_2j + z_2k = \cos(\pi/4) + \sin(\pi/4)k
$$
And this one represents rotation for the same angle $\pi/2$ over the $y$ axis.

$q_1*q_2 = q_3$ which would be the same rotation as if we made $q_1$ first and $q_2$ second.
$$q_3 = \frac{1}{2} + \frac{i}{2} +\frac{j}{2} +\frac{k}{2}$$

QUESTION 1: Given $q_2$ and $q_3$ how can I find $q_1$?

QUESTION 2: How to find a rotation angle over some other vector, given rotation quaternion? For example I want to find on what angle does $q_3$ turned over $2i+j-k$ quaternion.

答:
Quaternions

Mathematical definition

$\mathcal{H} := \{ h_{1} + h_{2}i + h_{3}j + h_{4}k : h_{1},h_{2},h_{3},h_{4} \in \Re$ and $ i^{2} = j^{2} = k^{2} = ijk = -1  \}$

A pure quaternion can be defined as:

$\mathcal{H}_{p} := \{ p \in \mathcal{H} : Re(p)=0\}$

Pure quaternions can be associated to vectors.

Translation

Since pure quaternions are directly related to vectors, you can add two pure quaternions to form a third one.  Observe the figure, were we represent a pure quaternion and the real axis is omitted:

Rotation

A general rotation of $\phi$ around an arbitrary unit norm rotation axis n is givem by:

QUESTION 1: Given $q_{2}$ and $q_{3}$ how can I find $q_{1}$?

If $q_{3} = q_{1}q_{2}$ and they are rotation quaternions:

$q_{3} = q_{2}q_{1}$

$q_{3}q_{2}^{*} = q_{1}q_{2}q_{2}^{*}$

Since $q_{2}^{*}q_{2} = 1 = q_{2}q_{2}^{*}$

$q_{1} = q_{3}q_{2}^{*}$

were the * states for the conjugate of a quaternion.

QUESTION 2: How to find a rotation angle over some other vector, given rotation quaternion? For example I want to find on what angle does $q_{3}$ turned over 2i+j−k quaternion.

If your vector is represented by $n$ and you know the $r$, your rotation angle will be the double of the angle you see.

Example:

$n = i + 0j + 0k$

$r$ = $q_{1} = cos(\frac{\pi}{4}) + sin(\frac{\pi}{4})i$

from the formula presented in the section of rotation:

$\frac{\phi}{2} = \frac{\pi}{4}$

$\phi = \frac{\pi}{2}$

Hope that was useful.

Best regards

Title: Finding rotation quaternion


问:
Generalized Voronoi Diagram
I need to compute the Voronoi diagram for a map with some obstacles but I can't find any pseudo-code or example in MATLAB.

The "voronoi" function in MATLAB works with points, but in this case the obstacles are polygons (convex and non-convex). You can see the map in the attached image.

Because the obstacles are polygons I found that the Voronoi algorithm needed is the GVD (Generalized Voronoi Diagram).

Can anyone help with code or examples on internet explaining how to compute this GVD?

答:
In advance, that you need the Voronoi diagram for motion planning, here is an RRT implementation in matlab: http://arms.nu.edu.kz/research/matlab-toolbox-rrt-based-algorithms

I have created a Python implementation which is until now not available on github but follows the idea of LaVelles paper "Rapidly-Exploring Random Trees: A New Tool for Pathplanning" (1998). My implementation not only samples the state-space of a 2d maze, but also uses a underlying physics engine for motion prediction. It was programmed in under 200 Lines of code with the help of the eclipse IDE and is capable to drive a robot to every point in the maze. It's a little bit like the famous A* pathplanning algorithm but it's more general and has a probabilistic background.

Title: Generalized Voronoi Diagram


答:
The other answers advocate the use of stepper motors.  They can be easy to control by just sending a certain number of pulses to the stepper controller.  However, they do not guarantee that you will not attempt to overtravel the mechanism.  Steppers can slip, or miss steps, if the torque is marginal.  If that happens going one direction, you will likely try to overtravel in the return direction.

I don't know of any motor that is easier for a newbie to control than a brushed dc motor.   To get it to rotate you just apply the proper voltage across the windings.  This is easily done using a relay.   Rotation in the other direction is accomplished by applying the same voltage, but opposite polarity, to the same windings.

If you needed to control the motion profile accurately then you'd need some sort of position feedback, such as an encoder.  If this was the case then steppers would be more relevant. But your application does not require that.  You simply need a switch to be made when the window is opened, and another switch when the window is closed.   Simple.

Be careful, though.  Manually opening and closing the window lets the operator stop motion if pets or fingers are in the way.  By doing this automatically you need to make sure no fingers or tails will be chopped off by the motion.   That is a bigger challenge unless you will always be present and watching the window when you open or close it.

In response to the question you ask in the comment ("Do they provide some feedback back to the code if, for example, something was holding the window back?"):  you can monitor the current to the motor.  That is proportional to the motor's torque.  This signal is usually pretty noisy, though, so you would likely need to low-pass filter it either using a capacitor, or in your software.

Title: Question about what motor to use for opening window

Body:
first off, just to be transparent, I'm a total newbie when it comes to DC motors (and pretty much anything robotic).

I've got a couch that's right up to a window with the lever type openings (anderson windows). With the couch, I have no clearance to turn the lever to open it. Given I've replaced most of my house switches/outlets with home automatable ones, I figured I'd see if I can build myself a small motor that I can automate to open these also. To be absolutely honest, I've got no clue where to start. I have no problem with coding the automation part, but I don't even know what kind of motors to look for that would be able to turn my knob (or rather how to actuate the thing my knob connects to)...

Help!

Thanks :)


问:
Lidar problems in a multi-robot setup
Consider multiple mobile bases driving around in some area. In order to get meaningful data from the lidar of each base, the sensors should be mounted as horizontal as possible. Due to safety regulations, the lidars should also be mounted at a height of 15 cm from the floor. When I checked the data sheet of SICK lidars, it shows that all models use the wavelength 904 nm. Does that mean that mobile bases equipped with lidars with a coplanar scan lines will end up mutually blinding each other?

If it is the case, how is this problem solved? (I don't consider tilting the lidars a solution as it defeats the purpose of having "2D" lidars where even if the tilting angle is known, what the lidar observes becomes dependent on the robot's pose and distance from eventual obstacles)

答:
I wouldn't recommend using sensors with different laser frequencies either, because that likely means using an entirely different product, with different accuracy and other properties.

don't tilt, shift

I think the idea of tilting a laser scanner is very problematic, especially with a height constraint like you have. But what about shifting the scanner up or down in each unit?

Let's say if a scanner does not interfere with another one if it's 1 cm above the other. You can give the scanner on each robot a unique height they can operate on without causing any problems.

This solution is limited to a small number of robots, depending on the height difference necessary between two sensors and the available height on your robots.

scan sequentially

Given that you have established communication between the bases, each one could do its scan while the others are not using their sensor. After the scan is finished, a message is sent to the next robot.

This reduces the scanning frequency as they cannot happen in parallel. Depending on the range of the laser scanner, the size of the area and distribution of robots, this could be compensated by the fact that each robot scans the other one as an "obstacle". Each robot could estimate the new positions of all robots it sees and message that information to others after it did its scan. This can be tricky when it comes to identifying the other robots from the scan and if one robot could occlude another one.

shared pose knowledge

If each robot knows the poses of all other robots, it can exclude sensor readings from those directions. Depending on the situation, careful sanity checks might be necessary before excluding sensor data.

Otherwise an obstacle that's exactly between two robots would be "seen" by either one because sensor values detecting it were discarded for being "in the shadow" of the other robot.

give it a try

I'm not exactly sure how those scanners work in detail. Does both the laser and sensor rotate? Or are they omnidirectional? Or is either one omnidirectional?

Maybe having all sensors on the same height isn't that much of a problem unless two of them face each other exactly, which appears to be unlikely and even in case of failure would only falsify a few measurements. With the strategy of shared knowledge of the poses of the robots mentioned above, it should be possible to filter those measurements out.

ask sick

This is not some DIY hack, but product sold by a competent company. If in doubt about possible problems with their products, contact SICK and explain your project in detail with all the requirements and the issue that could arise. I'm sure they are willing to help you with their expertise given that you want to buy (or have bought) several sensor units from them. Even if not, it's definitely worth a try.

Title: Lidar problems in a multi-robot setup


问:
12 volt input to 5 volt ouput of Arduino
I accidentally ended up supplying 12 v to the Arduino 5v output pin instead of the Vin pin. Does that mean that I can't use the 5v output pin anymore i.e. its fried?</p>

答: Nobody can tell how much magic smoke is still in the device. You need a magic smoke detector (rarely also referred to as a "voltmeter"), hook one of its contacts up to the pin that should have 5 volts of smoke come out of it and the other to ground. If the detector says there are still 5v, you are probably in luck.</p>


问:
What tyre tread would be best suited to an off road robot expected to deal with frequently muddy conditions?
I'm looking to potentially build an autonomous robot that will frequently venture off road, and remain autonomous for up to 6 hours at a time. I've found limited information however about the best tyre tread for this purpose, what could be most suitable?

I'm especially looking for a tread pattern that won't need regular cleaning, to save setting this up automatically (a tread that gets "clogged" very quickly clearly won't be that effective at tackling tough terrain autonomously.)

答:
There is very little difference between a robotic off road vehicle and a normal vehicle with a driver. What kind of vehicles are suitable for off-road conditions?

Why - tractors of course!

Look at those bad boys! Great for all around the farm. Nobody seems to talk about the importance of cleaning the mud off them, except to read the part number to order replacements.

In fact, why not other off-road vehicles? Like Land Rovers:

They seem to be able to undertake long expeditions without requiring cleaning.

Or Monster trucks:

What you'll notice about the treads on these types of tyres is the alternating half-chevron patterns. They point in such a way that the mud sliding on the tyre is always pushed towards the outside of the tyre, eventually falling off. In a way they're self cleaning.


答: I fixed the servos by connecting the ground of the external batteries to the ground of the pololu and arduino circuit boards, then spent an hour to realize that a wire was loose.  :S</p>

Title: Connecting multiple different voltage servos to the same controller

Body:
I am using the Pololu Micro Serial Servo Controller connected to an Arduino and multiple other servos (4 total) to make a robot arm.  Two of the four servos require 4-6 volts, while the other 2 require 7-10 volts, so I am planning on powering all the servos separate from the Pololu.

I have the Arduino and Pololu connecting to each other correctly (flashing green led), but the servo(s) don't move when plugged in to the control pins.  All the servos work correctly when plugged into a servo-tester.

I think that this problem could be fixed by connecting the grounds of the servos to the ground of the Pololu, but would like advice because I am not sure if it will work, or will end up frying one of the parts (We already fried a pololu).

Would connecting the grounds of the batteries to the ground of the Pololu help, or damage the parts?

, but I couldn't figure out how to show the micro serial servo controller.


答: The screws that Roomba uses are special for going into plastic.  They are very similar to a #4 sheet metal screw.  So I don't think you are going to match the thread size exactly, but it doesn't matter.  As long as you don't plan on screwing and unscrewing the screws which will wear out the bosses.  Pretty much any screw with the right diameter will work because you are only going into plastic.  A #4 machine screw also works well.</p>

Title: What is the thread/screw size for the iRobot Create 2 internal screw bosses described in the Open Interface Spec doc

Body:
In the “iRobot_Roomba_600_Open_Interface_Spec.pdf” provided for the iRobot Create 2, there is a section titled “Roomba Internal Screw Boss Locations”.  It states that “Screws may be replaced with threaded standoffs.”

Does anyone know what screw/thread size of standoffs should be used to match the screw threads?

(I saw another similar thread but the only solution listed was to re-thread the holes, which I would like to avoid if at all possible.)

Thanks!


问:
what books do you suggest for a beginner like me ?
i am studying bacholar of dental surgery but have intrest in learning this subjet so tell me about a good book to read.</p>

答: Most introduction courses which are held on schools and universities are practical oriented. They use out-of-box robotics sets like Lego Mindstorms, Aldebaran Nao or Baxter Robot. On the topics of robotics there are many good books out there for theoretical advice. Most dominant is "Artificial Intelligence: A Modern Approach". A nice ressource for additional information is Google Scholar. At the beginning i would suggest to search for paper which are using computergames like Mario AI or Starcraft AI for implementing algorithms.</p>


问:
Mounting a gimbal BLDC motor
I'm trying to build my own motorised camera gimbal using a BLDC like this, where the shaft is hollow. Does anyone know how the camera platform should be mounted? Should a shaft be somehow pressed into the hole?

Any thought appreciated.

答:
On gimbal motors, the two sides of the motor casing are the mounting points. The hollow shaft allows you to feed wiring through the motor.

If you look at the motor you have linked more carefully the two sides are split and have bolt holes on them. So you just mount the motor with those.

Title: Mounting a gimbal BLDC motor


答: If you only want a single comprehensive text on Robotics, I would recommend the Springer Handbook of Robotics. I covers everything from controls and artificial intelligence to perception and mechanics; it is a phenomenal touchstone for further reading and is authored by the best minds in each sub-discipline in robotics. Of particular relevance to your background, there is significant coverage given to medical robotics, which you might find interesting.

Title: what books do you suggest for a beginner like me ?

Body: i am studying bacholar of dental surgery but have intrest in learning this subjet so tell me about a good book to read.</p>


问:
Issue using Digit LEDs Raw (op code 163) on Create2
If I understand the manual, each leg in each of the 7 segment displays is labeled with a letter A-G.  These letters then map to specific bits in a byte - 1 byte for each of the 4 displays.  Setting a bit turns on the corresponding leg while not setting it leaves it off.

With this understanding, I tried to turn on all the A segments by sending

```<code>[163][1][1][1][1]
</code>```

Instead of the A segment in each display turning on, the displays all showed a 1. Further testing shows that if I send the numbers 1-9 for any of the displays, they will display the number sent.  Sending the number 10 or greater turns on various combinations of the segments.

I was able to activate individual segments with the following numbers:

```<code>63 G
64 A
65 B
66 C
67 D
68 E
69 F
</code>```

However, I haven't been able to determine how the bytes sent affect the individual segments. Either I don't understand the manual or Digit LEDs Raw does not work as the manual specifies.

UPDATE 03JUNE2016

I have confirmed this behavior exists in the following firmware versions:

r3-robot/tags/release-3.4.1:5858 CLEAN

r3_robot/tags/release-3.2.6:4975 CLEAN

答: Opcode 163 has a known bug in it and should not be used.</p>


问:
Mobile robot path following using Model Predictive Control (MPC)
I'am trying to implement a path following algorithm based on MPC (Model Predictive Control), found in this paper : Path Following Mobile Robot in the Presence of Velocity Constraints

Principle: Using the robot model and the path, the algorithm predict the behavior of the robot over N future steps to compute a sequence of commands $(v,\omega)$ to allow the robot to follow the path without overshooting the trajectory, allowing to slow down before a sharp turn, etc.

$v:$ Linear velocity

$\omega:$ Angular velocity

The robot: I have a non-holonomic robot like this one (Image extracted from the paper above) :

Here is my problem: Before implementing on the mobile robot, I'am trying to compute the needed matrices (using Matlab) to test the efficiency of this algorithm. At the end of the matrices computation some of them have dimension mismatch

What I did:

For those interested, this calculation is from §4 (4.1, 4.2, 4.3, 4.4) p6-7 of the paper.

4.1 Model

$z_{k+1} =  Az_k + B_\phi\phi_k + B_rr_k$ (18)
  with:

  $A = \begin{bmatrix} 1 & Tv \\ 0 & 1 \end{bmatrix}$
  $B_\phi = \begin{bmatrix} {T^2\over2}v^2\\ Tv  \end{bmatrix}$
  $B_r = \begin{bmatrix} 0 & -Tv \\ 0 & 0 \end{bmatrix}$

  $T$: sampling period

  $v$: linear velocity

  $k$: sampling index (i.e. $t= kT$)

  $z_k:$ the state vector $z_k = (d_k, \theta_k)^T$ position and angle difference to the reference path
  $r_k:$ the reference vector $r_k = (0, \psi_k)^T$ with $\psi_k$ is the reference angle of the path at step k

4.2 Criterion

The predictive receding horizon controller is based on a minimization of the criterion

  $J= \Sigma^N_{n=0} (\hat{z}_{k+n} - r_{k+n})^T Q(\hat{z}_{k+n} - r_{k+n}) + \lambda\phi^2_{k+n}$, (20)

  Subject to the inequality constraint

  $ P\begin{bmatrix} v_n \\ v_n\phi_n \end{bmatrix} \leq q,$

  $n=0,..., N,$

  where $\hat{z}$ is the predicted output, $Q$ is a weight matric, $\lambda$ is a scalar weight, and $N$ is prediction horizon.

4.3 Predictor

An n-step predictor $\hat{z}_{k+n|k}$ is easily found from iterating (18). Stacking the predictions $\hat{z}_{k+n|k},n = n,...,N$ in the vector $\hat{Z}$ yields

  $\hat{Z} = \begin{bmatrix} \hat{z}_{k|k} \\ \vdots \\ \hat{z}_{k+N|k}\end{bmatrix} = Fz_k + G_\phi\Phi_k + G_rR_k$  (22)

  with

  $\Phi_k = \begin{bmatrix} \phi_k, \ldots, \phi_{k+N}\end{bmatrix}^T$,

  $R_k = \begin{bmatrix} r_k, \ldots, r_{k+N}\end{bmatrix}^T$,

  and

  $F = \begin{bmatrix}I & A & \ldots & A^N \end{bmatrix}^T$

  $G_i = \begin{bmatrix} 0 & 0 & \ldots & 0 & 0 \\ B_i & 0 & \ldots & 0 & 0 \\ AB_i & B_i & \ddots & \vdots & \vdots \\ \vdots & \ddots & \ddots & 0 & 0 \\ A^{N-1}B_i & \ldots & AB_i & B_i & 0 \end{bmatrix}$

where index $i$ should be substituted with either $\phi$ or $r$

4.4 Controller

Using the N-step predictor (22) simplifies the criterion (20) to
  $J_k = (\hat{Z}_k - R_k)^T I_q (\hat{Z}_k - R_k) + \lambda\Phi^T_k\Phi_k$, (23)
  where $I_q$ is a diagonal matrix of appropriate dimension with instances of Q in the diagonal. The unconstrained controller is found by minimizing (23) with respect to $\Phi$:

  $\Phi_k = -L_zz_k - L_rR_k$, (24)

  with

  $L_z = (lambda + G^T_wI_qG_w)^{-1}G^T_wI_qF$
  $L_r = (lambda + G^T_wI_qG_w)^{-1}G^T_wI_q(Gr - I)$

I'am trying to compute $\Phi_k = -L_zz_k - L_rR_k$ but the dimension of $L_r$ and $R_k$ does not match for matrix multiplication.

Parameters are :

$T=0.1s$

$N=10$

$\lambda=0.0001$

$Q=\begin{bmatrix} 1 & 0 \\ 0 & \delta \end{bmatrix}$ with $\delta=0.02$

I get :

$R_k$ a (11x2) matrix (N+1 elements of size 2x1, transposed)

$G_w$ a (22x11) matrix

$G^T_w$ a (11x22) matrix

$I_q$ a (22x22) matrix

$F$ a (22x2) matrix

$G_r$ a (22x22) matrix

so Lz computation gives (according to the matrix sizes)

$L_z=(scalar + (11x22)(22x22)(22x11))^{-1} (11x22)(22x22)(22x22)$

a (11x2) matrix.

as $z_k$ is (2x1) matrix, doing $L_zz_k$ from (24) is fine.

and Lr computation gives (according to the matrix sizes)
$L_r=(scalar + (11x22)(22x22)(22x11))^{-1} (11x22)(22x22)((22x22) - (22x22))$

a (11x22) matrix.

as $R_k$ is (11x2) matrix, doing $L_rR_k$ from (24) is not possible.

I have a (11x22) matrix multiplicated by a (11x2) matrix.

I'm sure I'm missing something big here but unable to see what exactly.
Any help appreciated.

Thanks

答:
The paper uses a mathematical formula for predicting the consequences of actions. That makes it difficult to debug possible failures. Improvement would be to use a physics engine like Box2D to predict actions. The advantage is, that prediction and controller are separated.

Update:
Optimal Control is done with a forward model. (From the current situation a projection is made into future). I'm not sure how this can be done with "Rk=[rk,…,rk+N]T".


问:
RVIZ Transform error Base_link and Camera_link
I am working on a differential drive robot with two motor wheels with encoders and caster wheels. The robot also has an Intel RealSense depth camera.

When I launch RVIZ: The Global option > Fixed frame is set to Base_link and shows all the transforms for the differential driver nodes. But an error appears for the Depth camera nodes with message saying:

```<code>No transform from Camera_depth_frame to baselink
No transform from Camera_depth_optical_frame to baselink
No transform from Camera_link to baselink
No transform from Camera_rgb_frame to baselink
</code>```

If I change the Global option > fixed frame to Camera_link, I can see all the transforms for the depth camera but now the differential drive transforms are not available

Hope you can help.

答:
You need to tell ROS the relationship between the camera frame the robot base. If you have a URDF model of your robot, add the Camera_link to the model and link it to the base.

If you don't have a URDF model, I think you can broadcast the transform yourself. See this tutorial.


答:
I found the solution to my problem : I was misunderstanding $R_k$ notation.

$r_k:$ the reference vector $r_k = (0, \psi_k)^T$

$R_k = \begin{bmatrix} r_k, \ldots, r_{k+N}\end{bmatrix}^T$

To compute $R_k$, I was replacing each value of $r_k$ and then, doing the transpose. But instead I have to do the transpose first, and then replace the values of $r_k$. Doing this, I get $R_k$ a (22x1) matrix and the computation works.

I did some tests with Matlab, but didn't manage to really make it work and as I didn't have the time to continue to work on it, it's in stand by. Anyway, if someone reading this, managed or trying to make a similar algorithm work, I'm interested to talk about it (but this is out of the scope of my original question).

Title: Mobile robot path following using Model Predictive Control (MPC)

Body:
I'am trying to implement a path following algorithm based on MPC (Model Predictive Control), found in this paper : Path Following Mobile Robot in the Presence of Velocity Constraints

Principle: Using the robot model and the path, the algorithm predict the behavior of the robot over N future steps to compute a sequence of commands $(v,\omega)$ to allow the robot to follow the path without overshooting the trajectory, allowing to slow down before a sharp turn, etc.

$v:$ Linear velocity

$\omega:$ Angular velocity

The robot: I have a non-holonomic robot like this one (Image extracted from the paper above) :

Here is my problem: Before implementing on the mobile robot, I'am trying to compute the needed matrices (using Matlab) to test the efficiency of this algorithm. At the end of the matrices computation some of them have dimension mismatch

What I did:

For those interested, this calculation is from §4 (4.1, 4.2, 4.3, 4.4) p6-7 of the paper.

4.1 Model

$z_{k+1} =  Az_k + B_\phi\phi_k + B_rr_k$ (18)
  with:

  $A = \begin{bmatrix} 1 & Tv \\ 0 & 1 \end{bmatrix}$
  $B_\phi = \begin{bmatrix} {T^2\over2}v^2\\ Tv  \end{bmatrix}$
  $B_r = \begin{bmatrix} 0 & -Tv \\ 0 & 0 \end{bmatrix}$

  $T$: sampling period

  $v$: linear velocity

  $k$: sampling index (i.e. $t= kT$)

  $z_k:$ the state vector $z_k = (d_k, \theta_k)^T$ position and angle difference to the reference path
  $r_k:$ the reference vector $r_k = (0, \psi_k)^T$ with $\psi_k$ is the reference angle of the path at step k

4.2 Criterion

The predictive receding horizon controller is based on a minimization of the criterion

  $J= \Sigma^N_{n=0} (\hat{z}_{k+n} - r_{k+n})^T Q(\hat{z}_{k+n} - r_{k+n}) + \lambda\phi^2_{k+n}$, (20)

  Subject to the inequality constraint

  $ P\begin{bmatrix} v_n \\ v_n\phi_n \end{bmatrix} \leq q,$

  $n=0,..., N,$

  where $\hat{z}$ is the predicted output, $Q$ is a weight matric, $\lambda$ is a scalar weight, and $N$ is prediction horizon.

4.3 Predictor

An n-step predictor $\hat{z}_{k+n|k}$ is easily found from iterating (18). Stacking the predictions $\hat{z}_{k+n|k},n = n,...,N$ in the vector $\hat{Z}$ yields

  $\hat{Z} = \begin{bmatrix} \hat{z}_{k|k} \\ \vdots \\ \hat{z}_{k+N|k}\end{bmatrix} = Fz_k + G_\phi\Phi_k + G_rR_k$  (22)

  with

  $\Phi_k = \begin{bmatrix} \phi_k, \ldots, \phi_{k+N}\end{bmatrix}^T$,

  $R_k = \begin{bmatrix} r_k, \ldots, r_{k+N}\end{bmatrix}^T$,

  and

  $F = \begin{bmatrix}I & A & \ldots & A^N \end{bmatrix}^T$

  $G_i = \begin{bmatrix} 0 & 0 & \ldots & 0 & 0 \\ B_i & 0 & \ldots & 0 & 0 \\ AB_i & B_i & \ddots & \vdots & \vdots \\ \vdots & \ddots & \ddots & 0 & 0 \\ A^{N-1}B_i & \ldots & AB_i & B_i & 0 \end{bmatrix}$

where index $i$ should be substituted with either $\phi$ or $r$

4.4 Controller

Using the N-step predictor (22) simplifies the criterion (20) to
  $J_k = (\hat{Z}_k - R_k)^T I_q (\hat{Z}_k - R_k) + \lambda\Phi^T_k\Phi_k$, (23)
  where $I_q$ is a diagonal matrix of appropriate dimension with instances of Q in the diagonal. The unconstrained controller is found by minimizing (23) with respect to $\Phi$:

  $\Phi_k = -L_zz_k - L_rR_k$, (24)

  with

  $L_z = (lambda + G^T_wI_qG_w)^{-1}G^T_wI_qF$
  $L_r = (lambda + G^T_wI_qG_w)^{-1}G^T_wI_q(Gr - I)$

I'am trying to compute $\Phi_k = -L_zz_k - L_rR_k$ but the dimension of $L_r$ and $R_k$ does not match for matrix multiplication.

Parameters are :

$T=0.1s$

$N=10$

$\lambda=0.0001$

$Q=\begin{bmatrix} 1 & 0 \\ 0 & \delta \end{bmatrix}$ with $\delta=0.02$

I get :

$R_k$ a (11x2) matrix (N+1 elements of size 2x1, transposed)

$G_w$ a (22x11) matrix

$G^T_w$ a (11x22) matrix

$I_q$ a (22x22) matrix

$F$ a (22x2) matrix

$G_r$ a (22x22) matrix

so Lz computation gives (according to the matrix sizes)

$L_z=(scalar + (11x22)(22x22)(22x11))^{-1} (11x22)(22x22)(22x22)$

a (11x2) matrix.

as $z_k$ is (2x1) matrix, doing $L_zz_k$ from (24) is fine.

and Lr computation gives (according to the matrix sizes)
$L_r=(scalar + (11x22)(22x22)(22x11))^{-1} (11x22)(22x22)((22x22) - (22x22))$

a (11x22) matrix.

as $R_k$ is (11x2) matrix, doing $L_rR_k$ from (24) is not possible.

I have a (11x22) matrix multiplicated by a (11x2) matrix.

I'm sure I'm missing something big here but unable to see what exactly.
Any help appreciated.

Thanks


问:
How to make an "invisible line following robot"?
I would like to build a robot which follows a virtual path (Not a visible path like a 'black line on a white surface', etc).

I'm just enthusiastic by seeing some sci-fi videos which show robots carry goods and materials in a crowded place. And they really don't follow a physical line. They sense obstacles, depth, etc.

I would like to build one such robot which follows a specific (virtual)  path from point A to B.

I have tried a couple of things:

Using a magnetic "Hall effect" sensor on the robot and wire carrying current (beneath the table). The problem here was that the vicinity of the hall effect sensor is so small (< 2cms) that it is very difficult to judge whether robot is on the line or off the line. Even using series of magnets couldn't solve this issue, as my table is 1 inch thick. So this idea flopped :P

Using an ultraviolet paint (on a line) and using UV leds on the robot as sensors. This will give more Zig-Zag motion for the robot. And due to potential threats of using UV light source, even this idea flopped :P

I finally thought of having a camera on top and using image processing algorithms to see whether robot is on the line or diverging.

Is there any better solution than this? Really looking for some creative and simple solutions. :)

答:
There are many possible ways to approach this problem, and they all depend on the material available and the expertise of the robot builder.

In short, the criteria is that:

The robot must get from point A to B following a pre-defined path.

The path taken must not follow a line visible to the human eye.

Depending on the length of the path, using encoders could be sufficient.  However, it should be noted that due to physical inaccuracy, drift makes odometry (what we call using encoders to measure distance) impractical for long distances.  However, this is easy for short distances, and should be at least considered.

If the distance is too far for only odometry, one should consider using some sensor to measure turns (for instance, a gyroscope or compass).  Turns tend to introduce the most error in odometry (measuring along a straight line doesn't have too much error), so using a sensor for turns can sometimes make odometry a viable solution.

If odometry or odometry + sensed turning doesn't work, then we get to be creative.  If you want the robot to follow a path composed of mostly straight segments, you could place IR LEDs at given "waypoints" on the table, and have the robot sense those LEDs and drive towards each waypoint in series.

However, that still leaves some visual marking on the table (although it could be disguised to some extent), and it would be great to be able to do without that.  Another approach would be to use laser pointers shining parallel to the surface of the table, but a few inches above the table.  The robot could use a photoresistor to detect when it crosses a laser, and this could let it know when to turn.

All-in-all, I think that the odometry augmented with an angle sensor is probably the best bet for your robot, at least with the way you have described it.  I may be able to think of more options, but that's all I see right now.

Just curious--why do you want the line to be invisible?  Knowing why could open up some more possibilities.


问:
How to determine quality of ICP matches?
In SLAM frontends which use the Iterative Closest Point (ICP) algorithm for identifying the association between two matching point clouds, how can you determine if the algorithm is stuck in a local minimum and returns a wrong result?

The problem is defined as matching two pointclouds which are both samples of some arbitrary surface structure, and the sampled areas have an overlap of 0-100% which is unknown. I know the Trimmed ICP variant works by iteratively trying to determine the overlap, but even this one can be stuck in a local minimum.

A naive approach would be to look a the mean square error of the identified point pairs. But without some estimate of the sampling this seems a risky thresholding. In the manual for the Leica Cyclone they suggest manual inspection of the pair error histogram. If it has a Gaussian shape the fit is good. If there is a linear fall-off the match is probably bad. This seems plausible for me, but I've never seen it used in an algorithm.

答:
In case you have some information from other sensors available (e.g. odometry from wheel encoders) you could use this when the rigid body transformation that the laserScanner suggests is far off.

Remember that on the long trajectories the odometry path diverges from the ground truth but locally it is pretty accurate.

PS. This is quite an interesting question so do let us know how you did it in case you actually solved the problem..


问:
Optimal trajectory for manipulators using optimal control
I'm trying to implement direct-multiple shooting method to my problem.

```<code>Objective function: tf
constraints       : q<q_max
                    v<v_max (v=dq/dt)
                    a<a_max
                    tau<tau_max (tau=M(q)a+B(q,v)+G(q))
                    C(q)=r_0-|P-P_0|  (obstacle avoidance)

Initial condition q(0)=q_0 (q_0 is given)
                  q(t_f)=q_f (q_f is given) and
                  v(0)= 0
                  v(t_f)=0
</code>```

As I understand from the theory, I have to divide the variables as state variables and control variables.

```<code>State variables are: q and v
Control variable is: tau
In each time interval I'll generate cubic splines which are q(t)=a_0+a_1*t+a_2*t^2+a_3*t^3
</code>```

Could you help me how I will implement it? I don't understand what is the ODE here and how I should construct the algorithm?

Are there any example about it?

edit to make the equations clear I'll rewrite them here again:

based on the link

state variables:
x1(t) = (q1(t) , ··· ,qn(t))^T and x2(t) = (q˙1(t) , ··· ,q˙n(t))^T.  and derivatives of the state variables are equal to x˙(t) = f(x(t) ,u(t)) where f is
f(x(t), u(t)) = ((q˙1(t), . . . , q˙5(t))^T;
                  M(x(t))−1· (u(t) − N(x(t)))

I don't know how to insert cubic polynomials in that equation system and how to solve ODE Will it be like [T,X]=ode45('f', [0 t_f], [q_0 q_f])

答:
@chuck: thanks for reading my answer and give advice that there is room for improvement. I would like to try out the edit button to improve my answer.

But to the topic:

A lock into history of optimal control may help to answer the question. A classical problem which is over 200 years old is the two body problem. Later in 1760 Leonhard Euler described the three-body-problem. In both cases, a mathematical system is used for describing the problem itself. The formula which describes the three body problem and the problem from the original post also are called "ordinary differential equation" (ODE). The solution for solving these kind of problem is to use a transfer function which is a backward ODE.

In robotics for most problems such a backward function is impossible to create because the mathematical theory has no answer. So in most cases the three-body-problem and also robotics problems are solved with numerical solver which are not very elegant but uses bruteforce searching to detemine the parameter.

Could you help me how I will implement it?

Optimal Control with obstacle avoidance can only be done with a numerical solver like A* or others. It is not poassible to use a ODE for this kind of task, it is a np-hard problem. An example implementation in matlab is done by. The author used the "OPTRAGEN 1.0 A MATLAB Toolbox for Optimal Trajectory Generation" for generating trajectory between obstacles.


问:
Difference between 3D Camera(using IR projection) and Stereo Camera?
I am currently busy with a final year project which requires me to track people walking through a doorway.
I initially thought this may be possible using a normal camera and using some motion detection functions given in OpenCV, I have however come to the conclusion that the the camera is mounted too low for this to work effectively.(Height shown in the image below)

I have now been looking into using a 3D camera or a stereo camera to try and get around this problem.

I have seen similar examples where a Kinect(from Xbox 360) has been used to generate a depth map which is then processed and used to do the tracking, this was however done from a higher vantage point, and I found that the minimum operating range of the Kinect is 0.5m.

From what I have found, the Kinect uses an IR projector and receiver to generate its depth map, and have been looking at the Orbbec Astra S which uses a similar system and has a minimum working distance of 0.3m.

My question now:

What exactly would the difference be between the depth maps produced by a 3D camera that uses an IR projector and receiver, and a stereo camera such as the DUO/ZED type options?

I am just looking for some insight from people that may have used these types of cameras before

On a side note, am i going about this the right way? or should i be looking into Time of Flight Cameras instead?

----EDIT----:

My goal is to count the people moving into and out of the train doorway. I began this using OpenCV, initially with a background subtraction and blob detection method. This only worked for one person at a time and with a test video filmed at a higher vantage point as a "blob-merging" problem was encountered as shown in the left image below.

So the next method tested involved an optical flow method using motion vectors obtained from OpenCV's dense optical flow algorithm.
From which i was able to obtain motion vectors from the higher test videos and track them as shown in the middle image below, because of the densely packed and easily detected motion vectors it was simple to cluster them.

But when this same system was attempted with footage taken from inside a train at a lower height, it was unable to give a consistant output. My thoughts of the reasons for this was because of the low height of the camera, single camera tracking is able to function when there is sufficient space between the camera and the top of the person. But as the distance is minimized, the area of the frame that the moving person takes up becomes larger and larger, and the space to which the person can be compared is reduced (or atleast that is how I understand it). Below on the right you can see how in the image the color of the persons clothing is almost uniform, Optical flow is therefore unable to detect it as motion in both cases.

I only started working with computer vision a few months ago so please forgive me if I have missed some crucial aspects.

From what i have seen from research, most commercial systems make used of a 3D cameras, stereo cameras or Time-of-Flight cameras, but I am unsure as to how the specifics of each of these would be best suited for my application.

答:
"3D camera" is a generalisation that covers sensors that can observe a point-cloud or depth map of the scene they are observing.
Some 3D cameras use a projector (via various ways) to improve the resolution and/or reduce noise of these sensors.

The fact that the projector is IR is not important, it could be a red laser projector instead, but IR is used so that humans don't see the projection. Obviously if you use an IR projector you need an IR camera to observe the projection.

The projector will project a pattern that is either:

A texture (not necessarily a pattern) projected to the scene to give better features for stereo-vision by imposing texture on smooth areas (which is problematic for calculating stereo disparity).

A pattern that is coded, which is decoded to produces a depth map.

Various pattern types can be used (time-multiplexed, spatially-coded, direct-coded or a mixture)

A good example of both of these is the Intel Realsense F200 (coded-light) and the R200 (stereo vision).

Aside: You should start a separate question for your application, and narrow down the scope of your question.


答:
This isn't an answer so much as a series of questions to get you to consider an appropriate solution.

I will, as usual :-), echo @BendingUnit22 and @Gouda - you appear to be fixated on a particular method of solution. This can be like, "What's a more fuel efficient way to buy groceries, a jet or a helicopter?" Well, can you just walk? If you go for a new sensor you'll need to learn to use it, which can be very time intensive. It's a color camera - can you split the image into R/G/B components and then do blob detection?

More importantly, consider your problem now: Two objects (people) get close together, and your blobs merge, and you can't tell them apart. What are you expecting is going to change when you get a depth component? The people still get close, and if they touch going through the door, then you now have a two-person-wide volume. This is exactly the same as the image blobs merging, except now you have an entire other dimension to work with.

If your primary issue is that you think the camera is mounted too low, why not just mount it higher? It would seem this would be dramatically simpler than purchasing and learning a new depth video system.

To answer your question specifically, any video system that gives depth should give video and depth. There will be differences in cost, resolution, accuracy, etc., but ultimately you should still get RGB+D. The Kinect uses structured light to get the depth map, stereo cameras use parallax, etc., but whatever the method to get the depth, the output is (generally) the same.

But again, to reiterate - consider what this system is actually going to get you and evaluate your current options again. There's almost certainly an easier way to do this.

Title: Difference between 3D Camera(using IR projection) and Stereo Camera?

Body:
I am currently busy with a final year project which requires me to track people walking through a doorway.
I initially thought this may be possible using a normal camera and using some motion detection functions given in OpenCV, I have however come to the conclusion that the the camera is mounted too low for this to work effectively.(Height shown in the image below)

I have now been looking into using a 3D camera or a stereo camera to try and get around this problem.

I have seen similar examples where a Kinect(from Xbox 360) has been used to generate a depth map which is then processed and used to do the tracking, this was however done from a higher vantage point, and I found that the minimum operating range of the Kinect is 0.5m.

From what I have found, the Kinect uses an IR projector and receiver to generate its depth map, and have been looking at the Orbbec Astra S which uses a similar system and has a minimum working distance of 0.3m.

My question now:

What exactly would the difference be between the depth maps produced by a 3D camera that uses an IR projector and receiver, and a stereo camera such as the DUO/ZED type options?

I am just looking for some insight from people that may have used these types of cameras before

On a side note, am i going about this the right way? or should i be looking into Time of Flight Cameras instead?

----EDIT----:

My goal is to count the people moving into and out of the train doorway. I began this using OpenCV, initially with a background subtraction and blob detection method. This only worked for one person at a time and with a test video filmed at a higher vantage point as a "blob-merging" problem was encountered as shown in the left image below.

So the next method tested involved an optical flow method using motion vectors obtained from OpenCV's dense optical flow algorithm.
From which i was able to obtain motion vectors from the higher test videos and track them as shown in the middle image below, because of the densely packed and easily detected motion vectors it was simple to cluster them.

But when this same system was attempted with footage taken from inside a train at a lower height, it was unable to give a consistant output. My thoughts of the reasons for this was because of the low height of the camera, single camera tracking is able to function when there is sufficient space between the camera and the top of the person. But as the distance is minimized, the area of the frame that the moving person takes up becomes larger and larger, and the space to which the person can be compared is reduced (or atleast that is how I understand it). Below on the right you can see how in the image the color of the persons clothing is almost uniform, Optical flow is therefore unable to detect it as motion in both cases.

I only started working with computer vision a few months ago so please forgive me if I have missed some crucial aspects.

From what i have seen from research, most commercial systems make used of a 3D cameras, stereo cameras or Time-of-Flight cameras, but I am unsure as to how the specifics of each of these would be best suited for my application.


问:
Can we simulate a actuator with a very strong torque with a PID controller
I use gazebo to simulate a robot arm. To control its joints, I use PID controllers. As you might know, PID are sometimes pretty hard to tune and this is the case for a robotic arm. To avoid any tuning, and because I don't need the PID values to be realistic, I set to zero the derivative and integral parameters, increase a lot the proportional gain and add a lot of damping in my joints. By doing this, I can get a well working arm but only if I disable the gravity.

My question is the following. Do you have an idea how I could simulate a very strong actuator with not necessarily realistic parameters?

EDIT 1: Setting the integral and derivative gain is stupid. The integral gain helps in correcting the effect of the gravity. The derivative gain counters the loss of stability and speed due to the integral gain.

This question somehow leads to another. Do you know what tuning do the robotic arm manufacturer (big arms for car industry for example). I guess that this arm use actuators with a very strong torque and a low maximum speed which reduces the need of tuning.

EDIT 2: More info on my setup. I use gazebo 6, with ODE. The robot description is in SDF. I control the robot with a model plugin. As a PID controler I use the PID class from the common library of gazebo and get directly the JointControler associated to the model.

Let say that I would like actuators very robust without any tuning needed. This way I could have a simulation WITH dynamics (by opposition to the SetPosition method). Do you think it is possible ?

答:
What you're asking for cannot be accomplished with a PID controller. As I understand your question, you want to be able to choose PID gains that would always produce a "good" trajectory, without tuning. You said it's alright if the motor output is unrealistic, i.e. the motors are "very strong" therefore can produce unlimited torque. However, you cannot escape the fact the your system has inherent dynamics. The response of the joint will always be affected by its inertia and damping, so unless you set those values to zero your response will change as they change. Since a robotic arm with more than 1 joint is nonlinear, inertia and apparent damping due to centrifugal and Coriolis effects will be changing constantly.

More Explanation

First, you seem to have some misunderstanding of how a PID controller works. A really simplistic description would be, given you want to get to some position $x_d$ and speed $v_d$:

the proportional term: the farther I am from $x_d$, the harder I push toward $x_d$

the derivative term: the slower/faster I am than $v_d$, the harder I push to speed up/slow down

the integral term: gee, all this pushing I've been doing hasn't gotten me much closer to $x_d$, I should push harder in that direction

Yes, the derivative term can help to reduce the oscillations introduced by the integral term, but that is not its purpose.

PID controllers are a great example of classical control, and are very useful because they can be tuned experimentally without knowing the exact mathematical model of the system you want to control. With some clever tuning you can make it so that the PID controller gives you a reasonable response for a small range of parameters, allowing them to work with nonlinear systems or linear time-variant systems, but there are two qualifying statements there: the parameter range has to be small and the controller has to be tuned. The parameter variation for multi degree of freedom robotic arms can be quite large (e.g. your inertia could double or halve in value) so achieving what you want without tuning at all is very difficult.

Possible Solutions

Turn off gravity and move your arm really slowly (i.e. large derivative gain relative to your proportional gain). The nonlinearities of robotic arms mostly come from dynamic coupling between joints, moving slowly should keep them really small.

Manually program the trajectories of each joint in the sim (fudging the dynamics). Let's say you're starting from angular position $\theta_0$ and you want to get to $\theta_d$. You could program the joints so that when they get a command to move to $\theta_d$ they follow a specific trajectory, for example $\theta(t) = \theta_0 + (\theta_d - \theta_0)(1 - e^{-t/\tau})(1 + t/\tau))$ will give you a smooth trajectory with no overshoot from the initial to the final position. Just adjust $\tau$ until it's as fast or slow as you like. The only problem with this method is that if you interrupt it during its motion it will look weird due to discontinuity.


问:
CC3D PWM control signal characteristic (to be simulated by Raspberry PI)
My goal is to control drone by Raspberry PI. The Raspberry PI uses camera and OpenCV, sends control commands to AVR microcontroller which will generate the PWM control signal. Meaning that it will simulate pilot with transmitter-receiver setup.

In other words (to make it more clear). Raspberry tells the Atmega8 that the drone needs to go more forward. Atmega8 generates custom PWM signals on 8 pins. Those signals are sent directly to CC3D pins responsible for roll, pitch etc. Atmega8 replaces controller receiver in this setup. It generates signal not based on user input but on what Raspberry tells it.

In order to do that I need the parameters (period, voltage etc.) of the PWM signal that CC3D accepts to properly simulate it. I have found this topic:

CC3D - Replacing RC emitter with an RPi

He has the same problem as I do and he found the solution. Unfortunately I can't send pm and I can't comment because I'm new to the site... so basically there is no way for me to contact him.

So any help would be appreciated.

答:
Ok I actually was able to make it work.

First of all in the beginning of the testing I used my own program which generated PWM signals. I wanted to make them 50Hz with 1.5ms of duty cycle being neutral position (of stick of the controller for example), 2ms max and 1ms min. Unfortunately when I connected my microcontroller to the CC3D I wasn't able to get through calibration of the controller reliably.

So you could understand everything: I wrote a program in Python which reads keyboard buttons presses and sends data packet to microcontroller. By default the data sent from computer to AVR micro controller connected to CC3D looks as follows:

a500b500c500d500e500f500g

When I press one of the keys defined in Python program it would send:

a500b900c500d500e500f500g

The micrcontroller breaks down this message and uses the numerical values between letters to modify the PWM duty cycle.

I tested it again and again and sometimes I could get through calibration in LibrePilot (program to configure CC3D) but after the program showed really crazy behaviour of the sticks and buttons on the controller.

THE SOLUTION:
Actually the solution is simple. Just use servo library for Arduino (I'm using Atmega8 with external 16Mhz and Arduino bootloader). It generates almost perfect 50Hz (my program couldn't generate as good of a custom PWM). With signal like that LibrePilot calibrates properly. Also worth pointing out is that you don't have to have those values of 1.5ms, 1ms, and 2ms set on the microcontroller. If the values are reasonable the LibrePilot's calibration process will be able to use the duty cycle you signal generates and bind it to max, min, neutral.

Below you can see how my hardware looks like. I hope I described everything clearly.


问:
is it possible to get all possible solutions of inverse kinematics of a 6 DOF arm?
I would like to know if there is any way to get all the possible solutions of inverse kinematics of a 6 DOF robotic arm?
I have found some good Matlab codes but gives only one solution like in Peter corke's book .
Thank you in advance.

答:
I suggest you look at Craig's book Introduction to Robotics Mechanics and Control.  In the inverse kinematics chapter he addresses the multiple closed-form solutions obtained analytically.  Many other texts address this issue also.

In general, if the wrist is spherical (i.e., all three axes intersect), you can enumerate all of the various closed-form solutions through a method known as wrist partitioning.   This method uses the three arm joints to solve for the position of the wrist center.  It then uses the wrist joints to determine the joint angles which orient the end effector properly.  Multiple solutions are possible from "wrist up" and "wrist down" options, "elbow up" and "elbow down" options (for an articulated arm), and "over the shoulder" options also.   For other robot geometries the options would differ.

If the wrist is not spherical, it becomes quite challenging to find a closed-form inverse solution.   But you still have the various geometric options for inverse kinematics solutions.

One way to make sure you are identifying all of the solutions is to recall the fundamentals of trigonometry.   Recall that $\sin(\theta) = -\sin( - \theta)$ and $\cos(\theta) = \cos( - \theta)$.  So when you are solving for $\theta$ you have to consider the other angles which produce the same result using these and other trigonometric identities.


问:
Is horsepower related to torque in electric motors?
Is torque related to size or power at all in electric motors? And what about gas motors too?

I have a go kart that is 2.5hp and it's 50cc and its about 1ft x 2ft x 1ft in size. I also see online there are .21 cubic inch gas motors for R/C cars that are also 2.5hp, the difference being that the R/C motor spins at 32k rpm while the go-kart motor spins at 12k rpm. If I were to put a gear reduction on the R/C motor, would it preform more or less the same as the go kart motor? Why is there a size difference?

Same for electric motors. I can buy an RC car electric motor that's 10hp and the size of a pop can. The CNC machine at work has a 10hp motor the size of a 5 gal bucket. Again, the only difference is the RPM.

If I were to reduce both setups so they spun at the same RPM, would they preform the same?

The only reasons I could think of is 1. Cooling and 2. RPM control (For PID loops and sensors)

答:
Torque is the amount of "rotational force" available at the output shaft of the motor.   You can increase or decrease torque using gears.  Torque has nothing to do with how fast the rotational force can be applied to do work (gearing will change the required motor shaft rotational speed to achieve the desired output shaft rotational speed, but that is still just an increase or a reduction in torque).

Horsepower is a measure of power - work done in a specific period of time.   So a higher hp motor can produce its torque in less time than a lower hp motor can.


答:
Horsepower is torque multiplied by angular velocity.

If you have an electric motor that has constant torque throughout its speed range, then the horsepower will increase proportionally with speed, and the maximum horsepower will be at the maximum speed. The faster it can spin, the more horsepower it can produce.

An internal combustion engine's torque is never constant with speed, so it is harder to know at what speed you will have maximum horsepower (and some electric motors have the same issue). It is usually near the top RPM, just above the peak in the torque curve. If you can move the torque curve up on the RPM, by improve breathing or by super/turbo-charging, then you will increase the horsepower without needing to increase torque.

Horsepower will remain constant through a gear-train, except for frictional losses. Reducing the speed will increase the torque proportionally. So if you you use a 5:1 gear reduction, you divide the speed by 5, but muliply the torque by 5, giving you the same horsepower.

Title: Is horsepower related to torque in electric motors?

Body:
Is torque related to size or power at all in electric motors? And what about gas motors too?

I have a go kart that is 2.5hp and it's 50cc and its about 1ft x 2ft x 1ft in size. I also see online there are .21 cubic inch gas motors for R/C cars that are also 2.5hp, the difference being that the R/C motor spins at 32k rpm while the go-kart motor spins at 12k rpm. If I were to put a gear reduction on the R/C motor, would it preform more or less the same as the go kart motor? Why is there a size difference?

Same for electric motors. I can buy an RC car electric motor that's 10hp and the size of a pop can. The CNC machine at work has a 10hp motor the size of a 5 gal bucket. Again, the only difference is the RPM.

If I were to reduce both setups so they spun at the same RPM, would they preform the same?

The only reasons I could think of is 1. Cooling and 2. RPM control (For PID loops and sensors)


答:
What is horsepower?

Horsepower is a measure of power (work done in a specific period of time - the higher power, the more work done), just like watts or kilowatts. $ 1 hp \approx
0.75 kW$ In case of mechanical power it is torque multiplied by rotational speed.

Relation between power and torque

The more power a motor can produce the more torque you can get from it, at the same rotational speed. However, you can change ratio of torque to speed using gears, so you can have high power motor that will give less torque than appropriately geared weaker motor.

Relation between size and power/torque

Generally the bigger motor, the more power it can produce. However, there are many different types of motors: BLDC will usually have higher power from the same size than regular DC motor.

Motors with integrated gears will be bigger than those without them, but will produce the same power, but different torque and different speed. Motors that are intended to run for years in the industrial environment will be bigger than its hobby counterparts - the bigger size allows them to be less stressed and better cooled.


问:
Localising a robot placed at an unknown position in a known environment
I am a third-year electrical engineering student and am working on an intelligent autonomous robot in my summer vacations.

The robot I am trying to make is supposed to be used in rescue operations. The information I would know is the position of the person (the coordinates of the person in a JSON file) to be rescued from a building on fire. I would also know the rooms of the building from a map, but I don't know where the robot may be placed inside the building to start the rescue operation.

That means I have to localise the robot placed at an unknown position in a known environment, and then the robot can plan its path to the person who has to be rescued. But, since this is not my domain I would like you to guide me on what is the best method for localising given that I can use an IMU ( or gyro, accelerometer, magnetometer) and ultrasonic sensors to do the localising job. I cannot use a GPS module or a camera for this purpose.

I, however, do know how to do path planning.

As far as my research on the Internet is concerned I have found a method called "Kalman filtering" that maybe can do the localising job. But there are I think some other filtering methods as well. Which one should I use? Or is there any other simpler/better method out there of which I don't know yet?

I am also attaching the map of the building which is known to me.

Edit:

The terrain is flat, and I would like to know where the robot is on the map like at coordinate 0,4 etc.

答:
The problem is that you can't apply path planning until you know where the robot is in the global coordinate frame. There are many localization techniques, and each has its pros/cons; I have used Particle Filtering for a very similar localization task. Extensive coverage of particle filtering is given by Sebastian Thrun in his book Probabilistic Robotics--see chapter 8. There are advantages of particle filtering over Kalman Filtering (and the other way around), but the nice thing about particle filtering is that you can use raw measurements directly, it accepts measurement noise with any distribution, it can be used for global localization, it doesn't rely on a discretization of the world (e.g. a grid), and it is relatively simple to implement.

The algorithm presented by Thrun is Monte Carlo Localization (MCL). Prerequisites for the algorithm are that you have a model for the motion of your robot (this could be noisy unicycle dynamics) and a measurement model of your sensor--in your case, the ultrasonic sensor is a noisy beam sensor. See my previous post about ultrasonic sensors and measurement models. For the particle filter, you won't really need the IMU data, but you can incorporate it to improve your localization results; I will assume that you won't do this.

The MCL algorithm is summarized but the following pseudo-code:

$\bar{X}=X=\varnothing$

For m=1 to M particles, do:

i. $x_t^{[m]}$=sample_motion_model($u_t,x_{t-1}^{[m]}$)

ii. $w_t^{[m]}$=sample_measurement_model($z_t,x_t^{[m]},m$)

iii. $\bar{X_t}+=\langle x_t^{[m]}, w_t^{[m]}\rangle$

For m=1 to M particles, do:

i. sample particle $i$ with probability proportional to $w_t^[i]$

ii. add $x_t^{[i]}$ to $X_t$

Return $X_t$

$X_t$ is the set of M particles $\{x_t^{[1]},x_t^{[2]},...,x_t^{[M]}\}.$ $u_t$ is the action taken at time $t$, $z_t$ is the measurement taken at time $t$, $x_t^{[m]}$ is a particle representing the state of the robot at time $t$, and $w_t^{[m]}$ is the weight of particle $m$ at time $t$. The bar notation indicates a belief prior to incorporating the measurement, just after executing the action.

In words, particle filtering works like this: throw out a bunch of particles, see how good they are based on what the robot has just done and based on what the robot observes, then pick the best particles and repeat. For particle filtering, you need to use a sufficiently large number of particles, and there are numerous techniques that can be used to improve performance and accuracy. Also, you need to know some math to go through the proof, but it is straightforward.


答: There are many tactics for localization in a known environment. the most popular ones are the Filtering methods which include Kalman filtering and Particle filtering. Nowadays the second one is the most efficient and most widely used in this kind of situations. A good starting point for learning about localization techniques and the intuition behind them is this Robotics course on Udacity by Sebastian Thrun.

Title: Localising a robot placed at an unknown position in a known environment

Body:
I am a third-year electrical engineering student and am working on an intelligent autonomous robot in my summer vacations.

The robot I am trying to make is supposed to be used in rescue operations. The information I would know is the position of the person (the coordinates of the person in a JSON file) to be rescued from a building on fire. I would also know the rooms of the building from a map, but I don't know where the robot may be placed inside the building to start the rescue operation.

That means I have to localise the robot placed at an unknown position in a known environment, and then the robot can plan its path to the person who has to be rescued. But, since this is not my domain I would like you to guide me on what is the best method for localising given that I can use an IMU ( or gyro, accelerometer, magnetometer) and ultrasonic sensors to do the localising job. I cannot use a GPS module or a camera for this purpose.

I, however, do know how to do path planning.

As far as my research on the Internet is concerned I have found a method called "Kalman filtering" that maybe can do the localising job. But there are I think some other filtering methods as well. Which one should I use? Or is there any other simpler/better method out there of which I don't know yet?

I am also attaching the map of the building which is known to me.

Edit:

The terrain is flat, and I would like to know where the robot is on the map like at coordinate 0,4 etc.


问:
When was the first time a robot killed a human?
Scott Adams, creator of Dilbert, recently shared an article about a robot the police used to kill a suspect by detonating a bomb in close range.

This made me wonder -- when was the first time a robot took a human life?

Good comments were made on this which leads me to clarify that I mean a pureposeful taking of life. I shy away from the term "murder" because that involves legal concepts, but I mean an intentional killing.

An interesting subdivision would be between robots under active human direction ("remote control") and those with a degree of autonomy.

答: Are you including remotely operated vehicles in your understanding of robots or only autonomous? The first case of a human killed by a robot happened on Jan 25, 1979 (http://www.wired.com/2010/01/0125robot-kills-worker/). As for remotely operated you'd have to look to the military. I believe it happened shortly after we introduced counter IDE robots into the battlefield but I can't give you a specific. The first robot designed to be armed appeared in 2007 (https://www.wired.com/2007/08/httpwwwnational/) but I believe they were putting guns on them before that.</p>


问:
Typical laser scanner noise values
I am building an application that executes graphSLAM using datasets recorded in a simulated environment. The dataset has been produced in MRPT using the GridMapNavSimul application. To simulate the laserScans one can issue the bearing and range error standard deviation of the range finder.

Currently I am using a dataset recorded with range_noise = 0.30m, bearing_noise = 0.15deg. Am I exaggerating with these values? Could somebody provide me with typical values for these quantities? Do laser scanner manufacturers provide these values?

Thanks in advance,

答:
Am I exaggerating with these values?

No your're not but you need to filter the measurements. Also, you can double check datasheet of any laser sensor for the specifications. I've written a code for Kalman filter long time ago for a laser sensor that measures a static point located at <10,10>. Let's see how the filter is working with the noise you've stated (0.3m, .15deg).

As you see the measurements (green) are noisy and the filter (red) is doing a great job to estimate the true value (blue) even though the measurement model is nonlinear.

Title: Typical laser scanner noise values


答:
Firstly, to solve your problem in full would be a rather large post so I will focus on the methodology that you should follow.

As others have said, you would use some kind of filtering method to solve your problem; particle filtering, Kalman filtering, they are all the same thing but different variants that have different strengths. You could also use Markov Model methods that operate in discrete space rather than continuous space.

Firstly let's define the task: 3D (X, Y positions and yaw angle) localisation using an a priori map. This is different from SLAM (Simultaneous Localisation and Mapping) because you already have a map.
That being said, you could probably use an existing slam algorithm with a high-belief prior set by the map you have.

This leads to the definition of the states you are interested in (called the state vector):
$$\mathbf{x}_{k} = \big[ \mathbf{p}^\top, \mathbf{v}^\top, \psi \big]^\top$$
Where $\mathbf{x_k}$ is the state vector at discrete time-step $k$, $\mathbf{p}$ and $\mathbf{v}$ are the position and velocity, and $\psi$ is the yaw angle of the robot (all measured with respect to, and expressed in a global frame $\{G\}$). Velocity is added there because it is necessary for the prediction stage of the filter.

Second let's define the observations you can make (I exclude sensor measurements unnecessary for solving this 3DOF problem):

Range measurements of the relative position to the wall ahead of the robot: $y_u(\mathbf{x_k})$

Inertial measurements of the motion of the body:

Acceleration (2 axes, x and y): $\mathbf{a}_k$

Angular rotation rate (1 axis, z) $\mathbf{\omega}_k$

Magnetic field strength (1 axis, z) $m_k$

All measurements are made in the body frame $\{B\}$ which is attached to the IMU (note there is a transform between the ultrasound and body which I am not addressing, but should be addressed in an actual solution).

Now the issue is how do you use a filtering methodology to localise your robot?
Regardless of your choice of filter you will need a model that describes how the robot evolves through time (the process model).
Then you need a measurement model for each of your sensors, which describes what measurement is expected given an arbitrary state $\mathbf{x}$ of the robot.

For such a problem, your measurement models would describe (1) the ultrasound range, (2) the accelerometer, (3) the rate gyro, (4) the magnetometer.

Because of the high update rates of the IMU it is commonly used in the process model directly so that the update stage of the filter is not used too frequently (it is more computationally expensive than the predict stage). I'll refer you to equations (3) - (8) in this paper for this process model (in this application there is no need for quaternions so I'd advise to use Euler angle representations of the orientation instead).

Additionally, you must model the bias states in the IMU, which then adds another two states to your state vector:
$$\mathbf{x}_{k} = \big[ \mathbf{p}^\top, \mathbf{v}^\top, \psi, \mathbf{b}_a^\top, b_\omega \big]^\top$$
Where $\mathbf{b}_a$ and $b_\omega$ are the biases in the accelerometers and gyroscope, respectively.

The measurement model for the magnetometer can be found in equation 5.10 in this thesis.

Let's simplify your measurement model for your ultrasound, and pretend it is a laser range finder that simply returns the distance of the object (wall) it is pointing to. I assume you can do the calculation to convert the pulse times to distance. Your model is then:
$$y_u(\mathbf{x}_k) = |\mathbf{p}_{w,B}^B|_2 = |R^B_G(\mathbf{p}_{w,G}^G - \mathbf{p}_{B,G}^G)|_2$$
Where $ \mathbf{p}_{w,B}^B $ is the position of the wall that is being pointed to, with respect to (superscript) and measured from (subscript) the $\{B\}$ frame. $R^B_G$ is the rotation matrix that rotates a vector in the $\{G\}$ frame to the $\{B\}$ frame, and $\mathbf{p}_{B,G}^G$ is the position of the $\{B\}$ frame with respect to and expressed in the $\{G\}$ frame (which is the robot location represented by $p$ in the state vector).

You'll have to think about how to parameterize and calculate $\mathbf{p}_{w,G}^G$ (which is a function of the wall geometry, $p$ and $\psi$), I would think it would work with a look-up table or a solution to a set of line intersection equations representing the range beam and the walls. Either way it is discontinuous and nonlinear so this supports the use of a particle filter over a Kalman-based filter. You could possibly have a different measurement model for each wall if you really want to use a Kalman Filter, but that introduces a new data-association problem which is non-trivial.

I hope this plus NBCKLY's PF psuedocode gets you on your way.

A good resource on IMU models and noise.

Maybe of interest is this use of highly non-linear maps in PF's.


答:
I think 0.3m noise is a bit exaggerated for a scanning laser rangefinder.
As you saw with the Hokuyo (which is one of the cheapest LIDARs you can get) they say that it is 0.03m range "error" (they do not explicitly state this is 2$\sigma$, but I have tested the noise profile myself and it is consistent with 2$\sigma$).

My experience with laser scanners is that the depth accuracy is very much a function of cost, while the angular accuracy is pretty small and is only a real problem when the lidar is used for around 10m+.
A URG04LX (\$1,300) that I've calibrated had range standard deviations that were  around $\sigma = 0.013m$ while a Velodyne HDL64E (>\$150,000) had around $\sigma=0.006m$. I can't remember the angular $\sigma$s but the data sheet says around 0.08 degrees (which I again assume is 3$\sigma$).

Title: Typical laser scanner noise values

Body:
I am building an application that executes graphSLAM using datasets recorded in a simulated environment. The dataset has been produced in MRPT using the GridMapNavSimul application. To simulate the laserScans one can issue the bearing and range error standard deviation of the range finder.

Currently I am using a dataset recorded with range_noise = 0.30m, bearing_noise = 0.15deg. Am I exaggerating with these values? Could somebody provide me with typical values for these quantities? Do laser scanner manufacturers provide these values?

Thanks in advance,


问:
Autonomous Navigation without Distance Sensors
I'm doing a project with the iRobot Create 2. I want it to be able to map out a room and navigate to a point for example. My problem is that the robot doesn't have any distance sensors. What it can do is detect if there is an obstacle ahead of it or not (0 or 1) and it can measure how far it has traveled in millimeters. Any good techniques out there or best to buy an IR sensor?</p>

答:
With footslam or actionslam it is possible to locate pedestrian and smartphones even they have no distance-sensor. It is an advanced stochastic technic which is derived from classical "sebastian thrun slam" but uses less input data. The precision is low and thats the reason why footslam is often used together with other localisation techniques like satellite GPS. But, a "footslam only" implementation is possible.  Most research on this topic is done by DLR (Deutschen Zentrums für Luft- und Raumfahrt) which also has invented lots of similar algorithms like MagSlam oder WISLAM.

According to iRobot Create 2 sensors the irobot Create 2 has a "light bumper" as a sensor. To use this in a stochastic model the following sources may help:

Hassan A. Karimi: Indoor Wayfinding and Navigation, 2015, page 125-139

Dmytro Bobkov: Simultaneous Localisation and Mapping for 3D Pedestrian

Michael Hardegger, Michael: Navigation based on FootSLAM using Inertial Sensors, 2012

ActionSLAM on a Smartphone: At-Home Tracking with a Fully Wearable System, 2013

According my knowledge, there is no ready-to-run footslam-implementaton on github which can be used via out-of-the-box. But under the term "indoor mapping" there are a lots of opensource projects which are used together with smartphones.