问:
Gyroscope modeling parameters
Well im trying to model a gyroscope which is MPU-6050 and i am stuck in getting the missalignment and scale factor parameters from its datasheet ...
And there is another problem that the names in each datasheet differs from the others
My question is how to get those parameters?
Thanks ! </p>

Title: Gyroscope modeling parameters


问:
How to include a space and robot geometry with OMPL
Let us assume that I am able to create a 3D map (octree) based on information gathered by a Lidar and/or a camera on a quadrotor. Now based on the current 3D representation of the world, I want to go from the current pose to another one (which is in the known 3D environment).

To do so I want:

First to create a set of waypoints by using rrt*;

Then based on the waypoints, build polynomial curves.

So I took a look at OMPL, and although I understood the basics (well I think), I am still do not understand how to define the geometry of the robot (a box in my case) and how to define the working space (here a binary octree for instance).

From the examples I found, I see that goal and start spaces are defined, then a planner along with the problem definition is chosen, and finally solve. But I cannot see where the geometry and/or kinematics is defined no the world space...

Sorry for the naive question, but if somebody can provide a hint it will be very helpfull

Thank you

ContentLicense: CC BY-SA 3.0


问:
Effectiveness of visual odometry algorithms (CPU usage)
My robot needs to obtain visual odometry, with a condition that the used algorithm has to have as low computational requirements as possible and the used camera/sensor shouldn't be very expensive. The thing is that it'll run on a platform like Jetson together with lots of other CPU expensive processes.

Currently I'm trying monocular odometry packages from ROS (fovis, svo...) with an ASUS Xtion sensor which doesn't give very good results (due to computational power with fovis or probably insufficient FOV with svo).

As I don't have a stereo camera to compare it with and I don't want to buy one until I don't know if it helps, I want to ask whether stereo algorithms would be a better choice here (are they more effective?), having in mind the low-cost budget and low cpu requirements. The robot also has to keep the depth sensor (doesn't have to be strictly ASUS Xtion), so the possibilities are to use a different sensor usable for obtaining visual odometry or to equip the robot with another camera. If you have any other suggestions I will appreciate it. Thank you in advance!


问:
Pan and tilt bracket for a stepper motor
Currently, I'm using a pan tilt bracket that works with the servos I have (spark fun product 9065), and are generic to all servos. However, servos aren't accurate enough. I'm looking at other options, but have limited knowledge about them. What would you recommend?

An important consideration is that I need my motor to tilt in two dimensions, to any random $x, y$ coordinate accurately. To do this, I think I'll need some sort of attachment to the motor shaft, like the pan tilt bracket.

What motor and bracket would you recommend I use to go to any random $(x,y)$ coordinate?


问:
Create a dummy GPS
Im currently working on a small robot that uses an ardupilot for its control.

As Im working indoor, I can't use a real GPS so I'm making a dummy GPS based on UWB.

From UWB I get a position at +/- 10cm in cartesian coordinates.

To make it easier I convert my position to latitude & longitude using:

```<code>double Phi = this->latitude_0 * M_PI /380;
this->lat_to_meter = 111132.92 - 558.82*cos(2*Phi) + 1.175*cos(4*Phi) - 0.0023*cos(6*Phi);
this->lon_to_meter = 111412.84 * cos(Phi) - 93.5 * cos(3*Phi) + 0.118 * cos(5*Phi);
</code>```

and latitude_0 being 0 (all my reference are shifted to the point 0,0 close to the west of Africa).

Im building GPGA, GPRMC & GPVTG frames to feed the ardupilot.

GPS is detected & position is updated without any troubles.

But I'm struggling with the the Track Made good for the GPRMC & GPVTG sentences. GPGA, GPRMC & GPVTG definitions

Speed & everything else is trivial to calculate, but I can't understand the Track.

If Im not mistaken the track is the angle to the true north of the course i.e. the distance orientation (?).

So my question is given 2 coordinates in latitude & longitude (conversion to meter is trivial) : how can I calculate the Track ?

Title: Create a dummy GPS


问:
Heading drift on Beaglebone Blue on small AUV due to power cables (I think)
At my work we use the BeagleBone Blue boards to control somewhat small AUVs.
The board is placed in underwater tubes along with batteries, ESCs for thrusters and all other electronics.
We use the in-build magnometer and gyro to calculate the heading for navigating under water.
Testing the beagleboard alone on the desk shows that the heading is fairly stable and correct within reasonable limits.
The problem arises when we do offshore tests with the AUV. Here the heading will start to drift. A controller has been configured for the AUV to follow a reference heading for X amount of time. From the data we can see that the AUV actually do keep a steady heading, but from inspecting the vehicle IRL it becomes obvious that something is wrong as the vehicle will follow an arc instead of a straight line.

So to the AUV actually thinks that it keeps the same heading and actually does this for the first few meters and then starts to turn following an arc while still thinking it is on the same heading.

I know that we introduce quit some noise on the sensors by having the batteries, ESCs and wiring going around the board, but could this really be the course of this? Can anyone of you think of other possibilities? And can anyone suggest a solution to this (other than moving power units and wires to another shielded tube - this is not an option at this moment)?


问:
Interfacing multiple ethernet sensors on ROS system (single ethernet port)
My system consists of the following: A PC with a single ethernet port and other USB ports, a robot mobile base, a SICK LMS lidar with ethernet cable, a Velodyne sensor with Ethernet cable. </p>

<p>The robot is connected via serial to usb converter and works fine. The lidar can also be connected to the ethernet and works fine. Now that we have acquired a velodyne 3d Lidar, I am confused as to how to connect this to the computer as there is only one ethernet port available. Should I use a router? Has anyone tried to connect multiple sensors like this. I would be thankful if you can provide details. </p>


问:
Drone Feedback: Object Detection / Color Detection
I have been working on a code where an A.R Drone 2.0 will detect color and put a red dot in the middle of the image. I am using streaming for the drone. The goal is for the drone to detect a white gutter and fly straight over it from one point to the other. Essentially following a line. I noticed when I changed the BGR to 0, 0, 255, I get the entire gutter to be distinguished but it detects white spots as well. Is there to isolate my detection just to see the gutter. Maybe using shapes, once the gutter is detected, put a bounding box. And my finally question is how do I tell my drone to follow the red dot or maybe drawing a line. I looked at python-AR drone libraries but don't know how to apply it.This is my code.

```<code>import numpy as np
import cv2

# open the camera
cap = cv2.VideoCapture('tcp://192.168.1.1:5555')

def nothing(x):
    pass

cv2.namedWindow('result')

# Starting with 100's to prevent error while masking
h,s,v = 100,100,100
# Creating track bar
cv2.createTrackbar('h', 'result',0,179,nothing)
cv2.createTrackbar('s', 'result',0,255,nothing)
cv2.createTrackbar('v', 'result',0,255,nothing)

while True:
    #read the image from the camera
    ret, frame = cap.read()
    #You will need this later
    frame = cv2.cvtColor(frame, 35)

    #converting to HSV

    hsv = cv2.cvtColor(frame,cv2.COLOR_BGR2HSV)
    # get info from track bar and appy to result
    h = cv2.getTrackbarPos('h','result')
    s = cv2.getTrackbarPos('s','result')
    v = cv2.getTrackbarPos('v','result')

    # Normal masking algorithm
    lower_blue = np.array([h,s,v])
    upper_blue = np.array([180,255,255])

    mask = cv2.inRange(hsv,lower_blue, upper_blue)
    result = cv2.bitwise_and(frame,frame,mask = mask)
    cv2.imshow('result',result)
    #find center
    cnts=cv2.findContours(mask.copy(), cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)[-2]
    center=None

    if len(cnts)>0:
        c=max(cnts, key=cv2.contourArea)
        ((x,y),radius)=cv2.minEnclosingCircle(c)
        M=cv2.moments(c)
        center=(int(M["m10"] / M["m00"]), int(M["m01"] / M["m00"]))
        if radius>10:
            #cv2.circle(frame, (int(x),int(y)), int(radius), 2)
            cv2.circle(frame, center,5,(0,0,255),-1)

    # color detection limits
    lB = 5
    lG = 50
    lR = 50
    hB = 15
    hG = 255
    hR = 255
    lowerLimits = np.array([lB, lG, lR])
    upperLimits = np.array([hB, hG, hR])
    # Our operations on the frame come here
    thresholded = cv2.inRange(frame, lowerLimits, upperLimits)
    outimage = cv2.bitwise_and(frame, frame, mask = thresholded)
    cv2.imshow('original', frame)
    # Display the resulting frame
    cv2.imshow('processed',outimage)

    # Quit the program when Q is pressed
    if cv2.waitKey(1) & 0xFF == ord('q'):
         break

# When everything done, release the capture
print 'closing program'
cap.release()
cv2.destroyAllWindows()
</code>```


问:
Controlling a digital 360 degree servo
I have successfully controlled an analog 360 degree servo using a slide potentiometer, with the pot sending a 1000ms signal at one end of the pot and 2000 ms at the other. This gives me nice and smooth rotation speed control all along the pot axis.

I recently got hold of TowerPro MG90D servos, which would be ideal for the app I have in mind because of size and power, but I do not seem to find the right signal to send. If I run the same code, I get the servo turning 100% clockwise first, then in the middle a jittery very small step movement, then at some point full speed counterclockwise.

So my question is, what is the signal I should be sending to the digital servo?

This servo is indeed a 360° servo. Please see https://youtu.be/pyGhbPLZA04

Many thanks in advance!

Title: Controlling a digital 360 degree servo


问:
Beginners guide to Inverse Kinematics for biped robots?
I'm building a LynxMotion Scout biped and believe that IK are the best way to develop an effective gait.

I'm a mechanical design engineer - I currently have minimal skills / experience with programming, which I am looking to improve.

Does anyone have any suggestions for IK resources for bipeds that would assist my learning / knowledge of IK? (I have already searched online, with little success).

I would really appreciate any pointers or resources you can provide.


问:
What algorithm should I use to make a dynamic Line following robot?
I want to make a LFR using IR sensor.
Till now I coded my robot according to the track I am going to participate in. So it won't work on any other track.
But now I want to code it in a way that it will work on almost any track with any design.</p>


问:
Inverse Kinematics Tools
I am looking for inverse kinematics library (preferably compatible with ROS) that includes functions to calculate inverse-jacobian to go from end-effector velocity (twist) to joint velocities. I've only found KDL that has this capability but before implementing KDL, I would to see if there is any other options that I can use. </p>

<p>I also saw TRAC-IK but as I see from the source code, it only supports inverse position kinematics. </p>

Title: Inverse Kinematics Tools


问:
hand_eye_calibration, surface normal by stereo vision
I'm a graduate student at mechanical engineering. I took computer vision(stereo vision) last semester but I'm still fairly new to this area. I wonder if I may ask 3 questions related to computer vision? We have a 6 DOF robot arm, and we want to orient the end effector(z axis of end effector) to the normal of a curved surface. The geometry of this curved surface is unknown.

I wonder if you may suggest some good tutorials/paper/implementations of the extrinsic calibration? Assuming I have a stereo camera(ZED for example), which is fixed in space. I want to get the camera's coordinate and therefore all the pixels coordinates expressed in the robot base frame. I think this might be a hand eye calibration problem, but I think there might be a better methods?

May I use stereo camera like ZED to get the surface normal? Assuming I want to get the surface normal of a cylinder. Assuming I have the extrinsic calibrated camera ready, which faces this cylinder. My proposed method is that I mark 3 points a1,a2,a3 in vicinity, and I use a blue marker pen to mark these 3 points. I can get the "physical coordinate" of these three points in the robot base frame, then I took the cross product between the physical coordinate of (a3-a1) and the physical coordinate of (a2-a1), then I may have a normal at the physical coordinate of a1.

Any suggestions/improvements on my methods? My biggest concern is that ZED camera may not be a good option here, after all 400 dollar is not cheap for an international student. More importantly, I always feel there must a better option here.

I'm all ears. I assume I may not have a good description of my problem. Thank you for your attention and help in advance.

Best,


问:
How to make a line following algortihm for an A.R Drone 2.0?
I am trying to develop a line following algorithm where a drone will detect a bounding box and follow what is inside the bounding box.

I am filtering all the colors to only see the color white. Once that color is detected, I want the drone to go in a straight line from one end of the box to the other. Maybe it is easier using the draw line function on openCV but I am not sure. Any way, my biggest problem is telling the drone to follow the color or in other words the detected object.

I am using this repository from GitHub. Anyway this the code I have so far, and it only follows items that are moving. I need to follow an object that is stationary if that is possible.

```<code>#include "ardrone/ardrone.h"

int main(int argc, char *argv[]) {
    // AR.Drone class
    ARDrone ardrone;

    // Initialize

    if (!ardrone.open()) {
        std::cout << "Failed to initialize." << std::endl;
        return -1;
    }

    // Thresholds

    int minH = 0, maxH = 255;
    int minS = 0, maxS = 255;
    int minV = 0, maxV = 255;

    // XML save data

    std::string filename("thresholds.xml");
    cv::FileStorage fs(filename, cv::FileStorage::READ);

    // If there is a save file then read it

    if (fs.isOpened()) {
        maxH = fs["H_MAX"];
        minH = fs["H_MIN"];
        maxS = fs["S_MAX"];
        minS = fs["S_MIN"];
        maxV = fs["V_MAX"];
        minV = fs["V_MIN"];
        fs.release();
    }

    // Create a window

    cv::namedWindow("binalized");
    cv::createTrackbar("H max", "binalized", &maxH, 255);
    cv::createTrackbar("H min", "binalized", &minH, 255);
    cv::createTrackbar("S max", "binalized", &maxS, 255);
    cv::createTrackbar("S min", "binalized", &minS, 255);
    cv::createTrackbar("V max", "binalized", &maxV, 255);
    cv::createTrackbar("V min", "binalized", &minV, 255);
    cv::resizeWindow("binalized", 0, 0);

    // Kalman filter

    cv::KalmanFilter kalman(4, 2, 0);

    // Sampling time [s]

    const double dt = 1.0;

    // Transition matrix (x, y, vx, vy)

    cv::Mat1f A(4, 4);

    A << 1.0, 0.0,  dt, 0.0,
         0.0, 1.0, 0.0,  dt,
         0.0, 0.0, 1.0, 0.0,
         0.0, 0.0, 0.0, 1.0;

    kalman.transitionMatrix = A;

    // Measurement matrix (x, y)

    cv::Mat1f H(2, 4);

    H << 1, 0, 0, 0,
         0, 1, 0, 0;

    kalman.measurementMatrix = H;

    // Process noise covairance (x, y, vx, vy)

    cv::Mat1f Q(4, 4);

    Q << 1e-5,  0.0,  0.0,  0.0,
          0.0, 1e-5,  0.0,  0.0,
          0.0,  0.0, 1e-5,  0.0,
          0.0,  0.0,  0.0, 1e-5;

    kalman.processNoiseCov = Q;

    // Measurement noise covariance (x, y)

    cv::Mat1f R(2, 2);

    R << 1e-1,  0.0,
          0.0, 1e-1;

    kalman.measurementNoiseCov = R;

    char textBuffer[80];
    cv::Scalar green = CV_RGB(0,255,0);
    float speed = 0.0;
    bool learnMode = false;

    // Main loop

    while (1) {

        // Key input

        int key = cv::waitKey(33);
        if (key == 0x1b) break;

        // Get an image

        cv::Mat image = ardrone.getImage();

        // HSV image

        cv::Mat hsv;
        cv::cvtColor(image, hsv, cv::COLOR_BGR2HSV_FULL);

        // Binalize

        cv::Mat binalized;
        cv::Scalar lower(minH, minS, minV);
        cv::Scalar upper(maxH, maxS, maxV);
        cv::inRange(hsv, lower, upper, binalized);

        // Show result

        cv::imshow("binalized", binalized);

        // De-noising

        cv::Mat kernel = getStructuringElement(cv::MORPH_RECT, cv::Size(3, 3));
        cv::morphologyEx(binalized, binalized, cv::MORPH_CLOSE, kernel);
        //cv::imshow("morphologyEx", binalized);

        // Detect contours

        std::vector<std::vector<cv::Point>> contours;
        cv::findContours(binalized.clone(), contours, cv::RETR_CCOMP, cv::CHAIN_APPROX_SIMPLE);

        // Find largest contour

        int contour_index = -1;
        double max_area = 0.0;

        for (size_t i = 0; i < contours.size(); i++) {
            double area = fabs(cv::contourArea(contours[i]));
            if (area > max_area) {
                contour_index = i;
                max_area = area;
            }
        }

        // Object detected

        if (contour_index >= 0) {

            // Moments
            cv::Moments moments = cv::moments(contours[contour_index], true);
            double marker_y = (int)(moments.m01 / moments.m00);
            double marker_x = (int)(moments.m10 / moments.m00);

            // Measurements

            cv::Mat measurement = (cv::Mat1f(2, 1) << marker_x, marker_y);

            // Correction

            cv::Mat estimated = kalman.correct(measurement);

            // Show result

            cv::Rect rect = cv::boundingRect(contours[contour_index]);
            cv::rectangle(image, rect, cv::Scalar(0, 255, 0));
        }

        // Prediction

        cv::Mat1f prediction = kalman.predict();
        int radius = 1e+3 * kalman.errorCovPre.at<float>(0, 0);

        // Calculate object heading fraction

        float heading = -((image.cols/2)-prediction(0, 0))/(image.cols/2);
        sprintf(textBuffer, "heading = %+3.2f", heading);
        putText(image, textBuffer, cvPoint(30,30), cv::FONT_HERSHEY_COMPLEX_SMALL, 0.8, green, 1, CV_AA);

        // Show predicted position

        cv::circle(image, cv::Point(prediction(0, 0), prediction(0, 1)), radius, green, 2);

        //Speed

        if ((key >= '0') && (key <= '9')) {
            speed = (key-'0')*0.1;
            //printf("speed = %3.2f\n", speed);
        }

        sprintf(textBuffer, "speed = %3.2f", speed);
        putText(image, textBuffer, cvPoint(30,60), cv::FONT_HERSHEY_COMPLEX_SMALL, 0.8, green, 1, CV_AA);

        // Drone control

        double vx = 0.0, vy = 0.0, vz = 0.0, vr = 0.0;

        // Auto-follow

        vx = speed;
        vr = -heading;

        if (key == 0x260000) vx =  1.0;
        if (key == 0x280000) vx = -1.0;
        if (key == 0x250000) vr =  1.0;
        if (key == 0x270000) vr = -1.0;
        if (key == 'q')      vz =  1.0;
        if (key == 'a')      vz = -1.0;
        ardrone.move3D(vx, vy, vz, vr);

    // See you

    ardrone.close();

    return 0;
}
</code>```

I also tried using PID's like so.

```<code>        // Find largest contour
        int contour_index = -1;
        double max_area = 0.0;
        for (int i = 0; i < (int)contours.size(); i++) {
            double area = fabs(cv::contourArea(contours[i]));
            if (area > max_area) {
                contour_index = i;
                max_area = area;
            }
        }

        // A marker detected
        if (contour_index >= 0) {
            // Moments
            cv::Moments moments = cv::moments(contours[contour_index], true);
            marker.y = (int)(moments.m01 / moments.m00);
            marker.x = (int)(moments.m10 / moments.m00);

            // Show result
            cv::Rect rect = cv::boundingRect(contours[contour_index]);
            cv::rectangle(image, rect, cv::Scalar(0, 255, 0));
            //cv::drawContours(image, contours, contour_index, cv::Scalar(0,255,0));
        }

        // Take off / Landing
        if (key == ' ') {
            if (ardrone.onGround()) ardrone.takeoff();
            else                    ardrone.landing();
        }

        // Move using keyboard
        double vx = 0.0, vy = 0.0, vz = 0.0, vr = 0.0;
        if (key == 0x260000) vx =  1.0;
        if (key == 0x280000) vx = -1.0;
        if (key == 0x250000) vr =  1.0;
        if (key == 0x270000) vr = -1.0;
        if (key == 'q')      vz =  1.0;
        if (key == 'a')      vz = -1.0;

        // Switch tracking ON/OFF
        static int track = 0;
        if (key == 't') track = !track;
        cv::putText(image, (track) ? "track on" : "track off", cv::Point(10, 20), cv::FONT_HERSHEY_SIMPLEX, 0.5, (track) ? cv::Scalar(0, 0, 255) : cv::Scalar(0, 255, 0), 1, CV_AA);

        // Marker tracking
        if (track) {
            // PID gains
            const double kp = 0.001;
            const double ki = 0.000;
            const double kd = 0.000;

            // Errors
            double error_x = (binalized.rows / 2 - marker.y);   // Error front/back
            double error_y = (binalized.cols / 2 - marker.x);   // Error left/right

            // Time [s]
            static int64 last_t = 0.0;
            double dt = (cv::getTickCount() - last_t) / cv::getTickFrequency();
            last_t = cv::getTickCount();

            // Integral terms
            static double integral_x = 0.0, integral_y = 0.0;
            if (dt > 0.1) {
                // Reset
                integral_x = 0.0;
                integral_y = 0.0;
            }
            integral_x += error_x * dt;
            integral_y += error_y * dt;

            // Derivative terms
            static double previous_error_x = 0.0, previous_error_y = 0.0;
            if (dt > 0.1) {
                // Reset
                previous_error_x = 0.0;
                previous_error_y = 0.0;
            }
            double derivative_x = (error_x - previous_error_x) / dt;
            double derivative_y = (error_y - previous_error_y) / dt;
            previous_error_x = error_x;
            previous_error_y = error_y;

            // Command velocities
            vx = kp * error_x + ki * integral_x + kd * derivative_x;
            vy = kp * error_y + ki * integral_y + kd * derivative_y;
            vz = 0.0;
            vr = 0.0;
            std::cout << "(vx, vy)" << "(" << vx << "," << vy << ")" << std::endl;
        }

        // Move
        ardrone.move3D(vx, vy, vz, vr);
</code>```


问:
How could I make an all electric model rocket?
What I've been noodling on is how to convert that energy into thrust to create an all electric model rocket. I got as far as realizing that dumping electricity from a battery into a capacitor might result in fast enough power discharge, but I am stuck on converting that electricity into thrust for a model rocket. Any ideas?

This is related to the following Stack Exchange question:  Are LiPo really 100 times more energy dense than model rockets?


问:
Why to stop a particle filter if the robot does not move?
It is clear it is not a good idea to do resampling in a particle filter if the robot is not moving (there is no action), as the particles will converge towards a simple particle.

However, Probabilistic Robotics book quickly mentions "It is usually a good idea to stop measurement integration if the robot does not move". However, I am not able to fully understand why.

My only guess is that, if robot does not move the sampling (which not resampling) will give the same particles. Therefore, is there any other negative effect other than wasting computational power? Because in a world with lots of noise I think it might be helpful to keep the sampling running to have move proper weights over time.


问:
How would I go about interfacing the raspberry pi and arduino?
I want to do a project where I control motors, and the arduino seems ideal for that. However, I'm going to need to do quite a bit of processing on the back end first. Connecting the arduino to a computer isn't an option, because it has to be quite mobile. Does anyone have any experience controlling arduino with raspberry pi?</p>


问:
Correct Hardware for a Small Lightweight Robotic Arm
I'm building my first robotic arm and I am new to robotics generally, but I have tried to do some research.

I need to build a robotic arm that will be relatively lightweight and will need to grab things off of the shelf and place them higher up and then return them later. I have attached 3 photos showing the process I am imagining. The first shows the folded arm going to grab the object from the shelf. The second shows the arm extending up and the third shows the arm completely extended and placing the object on top of the shelf. The whole arm will be about 30 inches long and weigh about 3-4 pounds including the object it will be grabbing.

I know that stepper motors are the best route to go but what kind of holding torque will i need for that weight as well as for gripping the weight of the object which is only (120-200 grams)? Also bipolar or unipolar?

For a controller I am sure I need an Arduino but will the Uno be adequate to simultaneously control 6 motors? I don't think so. Any recommendations on one that will or how I can get multiple motors to move in sync? The arm's motions will be repetitive as there will only be so many places on the shelf for the arm to go, say 200 total. The command as to which spot will be sent remotely and I know Arduino has wifi options.

I will also need darlington arrays right? One for each motor?

Am I missing anything in terms of hardware?

Any help you can give me would be greatly appreciated.


问:
How do I choose the stepper motor torque for my robotic arm
I'm a communication engineer so my knowledge about robotics is very little.

I know the basic formula of torque T=mgL

in my project I have 2 arms & 2 motors

i used a torque calculator online and it came out with a very high torque a s a result which I didn't even found in the market!

here is a photo of the calculations

So the higher torque motor should have a torque of 580 Kg cm which is equal to about 60 Nm

I never found a stepper motor with such a great torque.

i read somewhere else in Quora that to lift a weight of 50 KG you need only 1NM so how come my 10 KG load requires that high torque?

so is there is something wrong with my calculations?
and what is the holding torque? is it the same one I'm calculating or it has another relation.

Note: I'm not concerned much about torque resulted from angular acceleration as I want a constant rotational speed.


问:
Kinect V2 (Arm/Hand Reading) to G-Code
I am very new to this space and would greatly appreciate some clear guidance.

I have a Raspberry Pi 3, Arduino Mega 2560+Shield, and Kinect v2 + PC USB cable adapter.

I am currently building the BCN3D MOVEO with the following goal:

To take in the right or left arm/hand motion of a person via the Kinect V2 to then be used to control the BCN3D robotic arm's stepper motors.

Below is my rough idea of what I should do. I know building the robotic arm will not be a problem but I am very lost on what to do with it after that.

So I would like to know how I can take the real-time XYZ data from a user's arm/hand seen by the Kinect and convert that into G-Code?

Title: Kinect V2 (Arm/Hand Reading) to G-Code


问:
Integrating Instantaneous Accelerations taken at discrete time intervals
I am trying to integrate instantaneous linear and angular acceleration taken at discrete time intervals (1/100 seconds, 100hz). data is collected beforehand, and integration is done offline, I only have access to these measurements at these discretized intervals, I have been trying to integrate these accelerations to reconstruct the original trajectory (position .ie x, y, z coordinates), but even at 100hz(data logging rate) there is quite a bit of deviation from the original trajectory, I have been using SEMI-IMPLICIT Euler for doing the integration.

and so I was wondering if there is any way to improve the accuracy of the integrated trajectory WITHOUT going significantly higher than 100hz (logging rate)?

note:
measurements are noiseless (simulator ground truth data),
logging rate has a std. deviation of 5 Hz

dataset consist of inst. angular accelerations, and inst. linear accelerations in body frame. i have access to initial orientation, velocity, position.

current code:

```<code>def integratePosition(initialPosition, initialOrientation, initialLinearVelocityBody, initialAngularVelocity,
                                    linearAccelerationsBody, angularAccelerations, frequency):
initialLinearVelocityEarth = transformToEarthFrame(initialLinearVelocityBody, eulerToQuaternion(*initialOrientation))
for a, alpha, f in zip(linearAccelerationsBody, angularAccelerations, frequency):
    initialAngularVelocity = integrateAngularVelocity(initialAngularVelocity, alpha, f)
    initialOrientation = integrateOrientation(initialOrientation, initialAngularVelocity, f)

    initialLinearVelocityEarth += transformToEarthFrame(a, eulerToQuaternion(*initialOrientation)) / f
    initialPosition = integratePosition(initialPosition, initialLinearVelocityEarth, f)

    yield initialPosition
</code>```

Thank you


问:
Accuracy of stereovision camera
I want to use stereovision to get 3D coordinates of a point in the camera's frame. Let's say, I can zoom in and click in the image to select my point of interest.

I want an accuracy of about 0.05 - 0.1mm. How do I select such a stereo camera? I checked a few stereocam specs but I didnt see any specification called 'accuracy' in it.

Is there some way to compute the accuracy from all other specs mentioned in the list?

I was looking at this camera
http://files.carnegierobotics.com/products/MultiSense_S7/MultiSense_Stereo_brochure.pdf

Title: Accuracy of stereovision camera


问:
VREP - Attaching Baxter manipulators
Trying to add manipulators to the VREP Baxter robot, I can add the gripper easily enough by adding the manipulator object in a scene to the appropriate arm tip and setting its position and rotation to 0 relative to parent.

However, the vacuum cup appears to require changes relative to parent of:

position (+0.0015, +0.002, -0.055)

rotation: -180 degrees in Alpha

Am I missing something or doing something wrong?

why isn't the vacuum cup manipulator model defined to attach to the parent model by default (zero offsets)?

I arrived at the above values by trial and error; are they derivable from the model somehow?

Title: VREP - Attaching Baxter manipulators


问:
How to interpret and apply results from Inverse Dynamics
I am applying Recursive Newton Euler Inverse Dynamics to a simple two link model. If I apply the result torques and forces using PhysX or Bullet Physics I get unexpected results. The model spins and deforms instead of rising in the Y direction without rotating and deforming as the input acceleration indicates:

The Newton Euler Inverse Dynamics (tested with RBDL and Matlab spatial_v2). Returns:

Tau = 0,6,0, -6,0,0, -3,0,0 = (force A, Torque A, Torque B)

When I apply these forces and torques in PhysX and Bullet the bodies deform and rotate. The values that work in Bullet and PhysX are: Fa=0,6,0 Ta=3,0,0 Tb=3,0,0.

When I feed Tau into Forward Dynamics using Composite Body or Articulated Body then the original acceleration is returned.

I am wondering how one applies Tau to a model. Is there a transformation I am missing somewhere? All the joints in the model are aligned with the worldspace axis.

Any help would be appreciated. Thanks


问:
How to create a Position controller for a Quadrotor
I have a controller that uses Theta,Z,Psi and Phi as a command. Now I want to create a position controller so that I can command a trajectory. I have checked a similar question raised in this attached link  Position Controller for a Quadrotor

But I couldn't figure out how to calculate the vx and vy in this equation:
\begin{align}
\hat{\phi}^d &= k_{p,y} (y-y^d) + k_{d,y} (v_y - v_y^d) + k_{i,y} \int_0^t (y-y^d) dt
\\
\hat{\theta}^d &= -k_{p,x} (x-x^d) = k_{d,x} (v_x - v_x^d) - k_{i,x} \int_0^t (x-x^d) dt
\end{align}
Are we going to use them as one of the command input or are there other ways to calculate them from the position?


问:
Camera calibration sequence with ground truth data
I'm looking for a SLAM dataset (monocular or stereo) specifically with a checkerboard, meaning the camera always has a checkerboard in frame.

Most popular datasets provide calibration sequences, however said calibration sequences do not contain ground truth data and can only be used to calibrate the camera.

Is there any datasets out there that provides its calibration sequence with ground truth data available?


问:
Pros/Cons of common robotics "kits" at the high school level
I am interested in starting a robotics club at my high school next year, since we don't have one, and I want to know what the pros/cons are of common kits. I already have a Vex kit since my uncle is one of the regional suppliers for Indiana, but I'm not sure that Vex is the best choice. What are the pros/cons of the other kits out there?

Note: I looked at Lego Mindstorms, and have used them when I was learning robotics, but do not want them for this. Also, i own a Raspberry Pi.


问:
How to calculate the pull force of scissors?
i want to use a stepper motor to move a brush to a industrial scissor machine to cut material of brushes.

The stepper motor will use a worm gear box to increase torque and smooth movement. The stepper motor will produce a torque about 0,4Nm and the gear box a torque of 20Nm. The distance is 0,15m. And the brushes with other stuff are about 1kg. For my calculation i must know how much pull force is produced by scissors.

How can i solve it?


问:
My robot arm vibrates during operation. Why?
Introduction:

I have modeled my 5-DOF robot arm in a simulation environment to test trajectories for my physical model. I have export the joint variables from the simulation as a .csv file. Then imported this file into the code and the values are written to the servo motors in an infinite while loop. There are 400 values for a 10 second motion. The trajectory that is followed by the robot can be found here:
https://www.youtube.com/watch?v=vDA3vEIyznc

The Problem:

When I compile the code the arm follows the desired trajectory but it vibrates while doing so. My guess is that 400 values for 10 seconds is less than the resolution of the motor that it can handle. But it can also be the backlash of the motors.

Additional Information:

I have designed the power circuitry of the servomotors using TI's PTN78020W adjustable switching regulator. The input to the regulators are supplied by a computer power supply. The regulator circuitry is shown below.

The entire system is shown by the visual below.

The Request:

I need suggestions on what causes the mentioned vibration and how to solve it. I can provide more information for troubleshooting on request.

APPENDIX

MATLAB Code:

```<code>clear all
clc

myArray = linspace(0,180,404)/180;

servoarray = csvread('C:\Users\Canberk  Gurel\Desktop\Robo1.csv',2,9);
servoarray = transpose(servoarray/180);

%Create an arduino object
a = arduino('com4', 'Mega2560');

% s = servo(a, 'D3');
s1 = servo(a, 'D9', 'MinPulseDuration', 700*10^-6, 'MaxPulseDuration', 2300*10^-6);
s2 = servo(a, 'D10', 'MinPulseDuration', 700*10^-6, 'MaxPulseDuration', 2300*10^-6);
s3 = servo(a, 'D11', 'MinPulseDuration', 700*10^-6, 'MaxPulseDuration', 2300*10^-6);
s4 = servo(a, 'D6', 'MinPulseDuration', 700*10^-6, 'MaxPulseDuration', 2300*10^-6);
s5 = servo(a, 'D3', 'MinPulseDuration', 700*10^-6, 'MaxPulseDuration', 2300*10^-6);
s6 = servo(a, 'D5', 'MinPulseDuration', 1*10^-3, 'MaxPulseDuration', 2*10^-3);

while true
   for i = 1:1:403
      writePosition(s1, servoarray(1,i));
      writePosition(s2, servoarray(2,i));
      writePosition(s3, servoarray(3,i));
      writePosition(s4, servoarray(4,i));
      writePosition(s5, servoarray(5,i));
      writePosition(s6, myArray(i));

      current_pos = readPosition(s1);
      current_pos = current_pos*180;
      fprintf('Current motor position is %d degrees\n', current_pos);
      %pause(0.1);
   end

   for i = 403:-1:1
      writePosition(s1, servoarray(1,i));
      writePosition(s2, servoarray(2,i));
      writePosition(s3, servoarray(3,i));
      writePosition(s4, servoarray(4,i));
      writePosition(s5, servoarray(5,i));
      writePosition(s6, myArray(i));

      current_pos = readPosition(s1);
      current_pos = current_pos*180;
      fprintf('Current motor position is %d degrees\n', current_pos);
      %pause(0.1);
    end
end
</code>```

Datasheet of the Servo Motors:

Additional Visuals


问:
Monocular SLAM depth reconstruction
I am trying to derive the inverse depth equation used in monocular SLAM algorithms. Specifically the equation 8 of the ORB SLAM paper

I am very close, except I do not understand where the (u_j-c) term comes form. I get the same formulae with only the c (principal point) component.

I am thinking it is because u_j in this case is indexed from the start of the epipolar line instead of the image (0,0). Is this correct?

Best,
Marc

Title: Monocular SLAM depth reconstruction


问:
How does one setup an ESC to drive a wheel-hub motor?
I have 2x 350W wheel-hub motors taken from a self-balancing scooter, or hoverboard. My intention is to use the two of them to drive a homemade R2-D2. However, some difficulties have been encountered that make it seem as though I am missing something trivial.

The ESC in question is a Hobbyking Quicrun 16BL30, driven by an HJ Servo Tester. Power supplies used include a 7.2V 1200mAh Ni-Cd battery, a 9.6V 900mAh Ni-Cd battery, and the 12V 18A rail of an ATX power supply. In testing configuration, the wheel-hub motor is clamped to the desk (no physical load). The ESC was programmed to the following values:

Running Mode: Fwd/Rev.

Drag Brake Force: 0%.

Low Voltage Cutoff: Disable.

Start Mode (Punch): Level 5.

Max. Brake Force: Disable.

Max. Reverse Force: 100%.

Initial Brake Force: 0%.

Throttle Range: 9% (Normal).

Timing: 11.25 deg.

Upon calibration and power-up, everything goes fine. However, driving forward/backward, the motor only runs for 3 seconds before stopping. The ESC light remains indicative of a load in that direction. When returned to neutral, then to run, it will go again. If done 3x or 4x, the ESC light will remain red when returned to neutral (indicative of an incorrect signal, or faulty connection to the motor). The ESC only needs reset to allow for 3s drives again. If alternated between forward and neutral at 1s intervals, it will continue running.

The instructions, manufacturer forums and google have failed to reveal another user encountering this problem. In a prior session, before accidentally resetting the ESC to all-default values, the wheel functioned perfectly for a few minutes. I feel as though I must be missing something trivial.

What am I missing?


问:
Measuring torque of Vex gear shaft - highest accuracy for lowest price
I am seeking to collect data for my IB Physics IA (internal assessment). My question seeks to establish the relationship between speed and torque by adjusting gear ratios. (I am aware that gear ratios add mass and thus increase the stall torque and makes data less imprecise). I am using a Vex gear shaft, Vex motor, along with Vex gears and sprockets.

I am aware of the basics of torque: (Power = torque * angular velocity) and (Torque = Force * radius). Also, I am aware that: (Centripetal Force = Velocity squared * mass / radius).

I can easily calculate the tangential or angular velocity of the moving shaft, but need to measure the torque.

I have already researched possible methods for measuring that could do this:

Torque sensor or gauge - Very expensive but is the most precise of the devices I have already researched. Will not buy, above $100.

Stress gauge - Two problems: (1) it seems to be a device that will only work on shafts with large diameters - a Vex shaft is square with side length 3-4 mm. Would it even work?; (2) stress is very loosely relative to torque. It is cheap, however, is desirable if accurate.

Torque wrench - In theory, you would use it until the shaft no longer moves and you can find the torque that way. It is harmful to the motor (and thus it would no longer be a consistent control). I am unable to find a small torque wrench - can anyone find one that is precise enough. This would, in theory, be cheap. Could I make my own and how? - if this is a good idea.

Similiar to 3 - Resistance encoder. Not sure if these exist but might work well. Any thoughts?

Add mass to the end of the shaft until it stops - With the centripetal force equation (or it slightly modified) I can calculate the necessary tangential force required to rotate the shaft (thus the torque by multiplying by radius). (Note: I am not certain that using the centripetal force equation would be correct - is there a better equation?). Cheap, but perhaps less accurate.

Other ideas?

What would be the best method for measuring the torque of the shaft? As I am collecting data to analyze, accuracy is the highest preferred trait, although I do not want to spend a lot of money.

If necessary, I can use an Arduino to collect data from electronic devices.

Any help would be very appreciated. Thank you. Feel free to ask more specific questions.


问:
Stereo vision setup to obtain depth map
I am currently working on a project that requires me to obtain depth information and point cloud map of objects in an indoor environment ( roughly twice the size of a normal room). I would like to know -

Would a set of >=2 stereo cameras (manually calibrated wireless sricam SP019 IP cameras) be a good choice to produce a map for the entire room ? I will be using OpenCV 3.3.1 for the calibration and depth mapping.

If I wanted to increase the range of my stereo pair, would I have to -

a) increase the baseline distance and keep them parallel ? There is some
 discussion here about the baseline and it's effect on accuracy.
However, there is no mention about the alignment of the two cameras.

b) Align them in a tilted fashion to face each other ? Would this
be bad for Image rectification ?

What sort of min-max Range can be achieved using >=2 wireless IP cameras in a stereo-vision setup ?

I would like to evaluate accuracy of depth measurements obtained from the IP cameras. I am planning to use Kinect depth images (for short ranges 0.8-5 metres) as a reference.

What are better commercial solutions for obtaining depth map for longer ranges ? I have seen a few discussions on StereoLabs Zed cameras (see here and here) but none that are convincing enough to make me buy it, as it is quite expensive.

I am aware similar questions like this have been asked but it did not contain any discussion on IP cameras.

I am interested in the personal experience of people who may have done something similar.

Thank you very much for reading.

Title: Stereo vision setup to obtain depth map


问:
How can I send commands from raspberry pi model 3B to Seriously Pro 3 Flight controller?
I am trying to make a quadcopter that receives commands from my android mobile phone. I currently have the following:

Raspberry Pi 3 Model B running on Raspbian.

Pi Camera

Seriously Pro F3 Flight Controller

I am planning on using bluetooth to send commands to my raspberry pi, but I am unable to figure out how to send commands from the raspberry pi to the flight controller. I am thus asking, how do I send commands (those of movement and throttle) from my raspberry pi to the flight controller.

Link to Flight Controller Documentation:
http://seriouslypro.com/files/SPRacingF3-Manual-latest.pdf

This is the project I am trying to make:
http://www.instructables.com/id/The-Drone-Pi/

This project is made with a MultiWii flight controller, while I want to make it with a SPF3 Flight Controller, I don't know how to approach accomplishing it.

I'm asking a similar question:
Quadcopter controlled by Raspberry Pi

but with a SPF3 Flight controller rather than CC3D Flight Controller and with a little more explanation of terms.


问:
PX4 Communication
Does anyone here know PX4 software? I'm using Eclipse to program it and I want to Open a new UART door and write on this, I'm doing the following commands...

```<code>static int uart2=open("/dev/ttyS1", O_RDWR | O_NONBLOCK | O_NOCTTY);
write(uart2,"Hi",3);
</code>```

But this is not working! Anyone have any idea why?

Title: PX4 Communication


问:
Developing world-frame Jacobian using product of exponentials
I am going through different texts (Spong Robot Modeling and Control, Murray Mathematical Introduction to Robotic Manipulations) and I am seeing different Jacobians developed for the same RRRP Manipulator (the SCARA).

My misunderstanding is similar as presented in this question . Overall, I am trying to develop the forward kinematics and Jacobian for the SCARA robot using exponentials of twists to test my knowledge but keep coming to different conclusions. I have found in Peter Corke's Robotics, Vision and Control this statement:

...compared to the Jacobian of Sect.8.1, these Jacobians give the velocity of the end effector as a velocity twist, not a spatial velocity  as defined on page 65. To obtain the Jacobian as described in Sect.8.1, we must apply the transformation...

$J^0 = \begin{bmatrix} I_{3x3} & -[t_{E}^0]_x \\ 0_{3x3} & I_{3x3} \end{bmatrix} J^V_0$

I can get to Murrays:

But I am trying to get to Spong's Jacobian:

Any help/clarification would be greatly appreciated!


问:
rtt-exercise building error-orocos-toolchain
I am using ros kinetic in ubuntu 16.04. My first error is:

```<code>Traceback (most recent call last):
  File "/opt/ros/kinetic/share/ros/core/rosbuild/bin/check_same_directories.py", line 46, in <module>
    raise Exception
Exception

    CMake Error at /opt/ros/kinetic/share/ros/core/rosbuild/private.cmake:102 (message):
  [rosbuild] rospack found package "controller-1" at "", but the current
  directory is "/home/robot/rtt-exercises-2.7.0/controller-1".  You should
  double-check your ROS_PACKAGE_PATH to ensure that packages are found in the
  correct precedence order.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/ros/core/rosbuild/public.cmake:177 (_rosbuild_check_package_location)
  CMakeLists.txt:24 (rosbuild_init)

-- Configuring incomplete, errors occurred!
See also "/home/robot/rtt-exercises-2.7.0/controller-1/build/CMakeFiles/CMakeOutput.log".
</code>```

So when i enter command " export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:~/rtt-example/rtt_examples-rtt-2.0-examples/rtt-exercises/controller-1 " than i'm getting below error:

```<code>Failed to invoke /opt/ros/kinetic/bin/rospack deps-manifests controller-1
[rospack] Error: package 'controller-1' depends on non-existent package 'rtt' and rosdep claims that it is not a system dependency. Check the ROS_PACKAGE_PATH or try calling 'rosdep update'

CMake Error at /opt/ros/kinetic/share/ros/core/rosbuild/public.cmake:129 (message):

  Failed to invoke rospack to get compile flags for package 'controller-1'.

  Look above for errors from rospack itself.  Aborting.  Please fix the
  broken dependency!

Call Stack (most recent call first):
  /opt/ros/kinetic/share/ros/core/rosbuild/public.cmake:207 (rosbuild_invoke_rospack)
  CMakeLists.txt:24 (rosbuild_init)

-- Configuring incomplete, errors occurred!
See also "/home/robot/rtt-exercises-2.7.0/controller-1/build/CMakeFiles/CMakeOutput.log"
</code>```

I have already installed the rtt-ros-integration package and orocos-toolchain package from source. And when i enter command " source ~/ws/underlay_isolated/installd_isolated/setup.sh " it again repeates the first error. So how should i solve this error. I was practicing the rtt-example package tutorial to learn orocos basics. This package is also avialabe in [here:]


问:
Matlab: Simulate received signals of sonar sensors
StackExchange community!

I need the guidance what to use for the generation sensor data in Matlab. My purpose is to optimize the exploration process of unknown environment using the multi-robot system. For that, I need to simulate the sonar sensor signals. The question is how to simulate them in Matlab?
I found sensorsig module in Phased Array System Toolbox and the link to use specialized ROS messages. Maybe, do you know some other solutions?
The requirements to sensors are a) to know the frontier points b) to detect obstacles. The noise can be ignored.


问:
Legged Design for Desert/Dune Exploration
I am currently in the process of writing a short sci-fi play about a team of researchers on Titan. With them, I'd like to have two four-legged robots (which would be actors in costumes). I'd like them to resemble Boston Dynamic's Spot or BigDog, with skinny legs and a bulky torso.

My question is: would the small foot design of those robots work well in desert areas? Walking through and over dunes, sandy beaches, that kind of thing. What's the best foot design for a legged robot traveling in sand?


问:
PixHawk I/II not working in 'Rover' mode (firmware issue?).... HELP!
We are working in a new agricultural rover, and we opted for PixHaw-II+ROS+MavLink platform as a good control alternative. However, our project is stuck as the PixHawk seems to work only when it is using Drone configuration: using Drone mode, power is released when performing drone-commands(wheels start moving). Once the configuration is changed to 'Rover' mode, there is no power output at all, even after calibrating the sensors and the battery (with this configuration, no PWM signal is shown when hooking up an oscilloscope.
We used Qgroundcontrol and Mission planner for the configuration, but none worked.

Has someone faced the same issue? we are quite sure this is a firmware-related problem. So any advice or trouble-shooting strategy is really welcome! Thank you!


问:
Quadcopter with wind effect
I drawn the Simulink model of a quadcopter with virtual joystick input and now I want to add the wind but I am little bit confused how to add wind with that model. actually my model is like that input joystick to the rotational+ translational  and get output from 3d Animation. I add wind model to my rotational sub model my but some one says like you can not add x,y and z component to the pitch , roll and yaw. so I trying to add this wind with thrust force like toque along x direction add with wind x component and torque y with wind y component and torque z with wind z component but still I think there is problem in units like I am adding force with velocity so its not make sense. I saw some paper in which wind is added like force and momentum component but I am not clear with that idea , can anyone help how should I connect wind component and why should I add momentum and force component???</p>

Title: Quadcopter with wind effect


问:
How to mount encoder without rear shaft?
I am interested in this robot chasis:

4 wheel robot chasis

There is no information on how to install encoders although the manual says it has space for encoders.

The page says that the motors do not have rear shaft, so, I was wondering if I can use encoders on this chassis, and if so, how can they be mounted? I do not want to mount them on the wheels.


问:
Kalman filter for slow ground vehicle with RTK
I have been using dual RTK receivers for my tractor projects.  This gives me reliable position, heading, and tilt at low rates (10 Hz).  I recently began working with an INS (an Advanced Navigation Spatial Dual) and it's wonderful to get a full Pose from a single device at up to 1000 Hz.  The problem I have is that an INS like this is expensive (~$12K) and total overkill for what I'm doing (driving on ground at 5.5 MPH).

Is there a way to achieve an adequate result using FOSS?  The articles I find on Kalman filtering seem to always assume that the NavSatFix does not provide sufficiently accurate absolute position data.  RTK, however, does provide sufficient accuracy and precision for my needs.

Note that while I do have radar ground speed available, my strong preference is to just use RTK receivers and a MEMS IMU.  Let's say that I want specifications comparable to my Spatial Dual but the update rate doesn't need to be over 100 Hz.

Update:  I found this paper which addresses the constraints of a (slow land-based non-holonomic) vehicle.


问:
Forward kinematics on Stanford manipulator
I recently had an exam in robotics and one of the questions was about forward kinematics on the Stanford manipulator below.

The DH parameters were given and we were asked to calculate the angular velocity $v_6$.
The question mentioned that there was a trick, a shortcut of sorts, so that we would arrive at the answer faster than going through the full forward process, calculating $v_{1-6}$ and $w_{1-6}$ using the all rotation matrices. Does anyone know that trick? Would be really helpful to understand something like that for the resit, when you only have 90min for the whole exam.

Thanks!


问:
Required library XENOMAI NOT FOUND
I am following this tutorial to install orocos in my system with ubuntu 16.06, xenomai 3.0.5. But i'm getting error:

```<code>Orocos RTT version 2.9.0
No orocos-rtt.cmake file loaded, using default settings.See orocos-rtt.default.cmake
Detected OROCOS_TARGET environment variable. Using: xenomai
-- CMAKE_VERSION: 3.5.1
-- Found Boost Uuid in /usr/include.
-- Orocos target is xenomai
XENOMAI_INCLUDE_DIR=XENOMAI_INCLUDE_DIR-NOTFOUND
XENOMAI_NATIVE_LIBRARY=XENOMAI_NATIVE_LIBRARY-NOTFOUND
CMake Error at config/LibFindMacros.cmake:74 (message):
  Required library XENOMAI NOT FOUND.

  Install the library (dev version) and try again.  If the library is already
  installed, set the XENOMAI_ROOT_DIR environment variable or use cmake to
  set the missing variables manually.
Call Stack (most recent call first):
  config/FindXenomai.cmake:72 (libfind_process)
  config/check_depend.cmake:164 (find_package)
  CMakeLists.txt:106 (INCLUDE)

-- Configuring incomplete, errors occurred!
See also "/home/robot/orocos-toolchain/build_isolated/rtt/install/CMakeFiles/CMakeOutput.log".
<== Failed to process package 'rtt':
  Command '['/home/robot/orocos-toolchain/install_isolated/env.sh', 'cmake', '/home/robot/orocos-toolchain/src/orocos_toolchain/rtt', '-DCMAKE_INSTALL_PREFIX=/home/robot/orocos-toolchain/install_isolated', '-G', 'Unix Makefiles']' returned non-zero exit status 1

Reproduce this error by running:
==> cd /home/robot/orocos-toolchain/build_isolated/rtt && /home/robot/orocos-toolchain/install_isolated/env.sh cmake /home/robot/orocos-toolchain/src/orocos_toolchain/rtt -DCMAKE_INSTALL_PREFIX=/home/robot/orocos-toolchain/install_isolated -G 'Unix Makefiles'

Command failed, exiting.
</code>```

Before this i have sucessfully installed orocos toolchIN without the xenomai kernel. But now i'm getting the error.

Title: Required library XENOMAI NOT FOUND


问:
Which Kinect to use for robotic arm pick and place application with object detection?
I am building a robotic arm for pick and place application. The robot is going to recognize several objects using the RGB feed from Kinect (will use a model such as YOLOv2 for object detection, running at maybe 2-3 FPS) and find the corresponding depth map (from Kinect again) to be used with the kinematic models for the arm. The YOLOv2 network input size is 416x416 px.

I will be working on Ubuntu 16.04 with ROS Kinetic. I also plan to work on indoor mapping and autonomous navigation in the future.

Is the Kinect 360 sufficient to achieve this? Is it worth buying the newer Kinect for XBOX One and will the 1080p feed make a huge difference?


问:
how to get velocity of Ar drone 2.0
i have question about AR Drone 2.0. i am using ROS Gazebo and Python. my question is how to get velocity of quadcopter? i need velocity to count position of quadcopter. Thankyou.

Title: how to get velocity of Ar drone 2.0


问:
Treatment of euler angles in quadcopter control
In most implementations of quadcopter control systems I've seen, each axis of the quadcopter is controlled independently. For example, to control the rate in the roll axis, the desired output is calculated using a PID controller with the error as input, and that output is applied as a difference in thrust between the corresponding motors. I know this works, It's what I currently use in my quadcopter, but it has always bothered me that the relationship between euler angles is ignored, so I've been trying to find a proper justification for this.

Controlling the thrust of each motor we can directly control the torque vector, as described in the "Torques" section of this article. In that article the quadcopter dynamics model is described, but when it starts describing the PD control part it says this as justification for setting each component of the torque proportional to an euler angle: $\text{Torques are related to our angular velocities  by } \tau = I\ddot \theta$, where $\theta$ refers to the yaw pitch roll angles vector, but unless I'm missing something that equation is valid for the angular velocity vector, not the yaw pitch roll vector. The implementation used in that article first chooses the torque vector based on the euler angles, and then solves for motor thrusts, and they  obtain good results, but I don't understand the justification.

Is there any justification for using the euler angles to control each axis independently?

EDIT: Seeing that the equation that transforms euler angle derivatives to angular velocities is (the $\theta$ in the right is the $(\phi,\theta,\psi)$  vector) : $$\omega=\begin{bmatrix} 1 &0&-s_\theta\\
0 & c_\phi & c_\theta s_\phi\\
0  &-s_\theta &c_\theta c_\phi\end{bmatrix}\dot\theta$$

It seems it might just be a small angle approximation (since the matrix is close to the identity when the angles are small).


问:
How to penalize blurred images in Bundle Adjustment?
We know that when rotational and linear velocity of the camera is high it is highly likely to get blurred images. The blurred image affects the quality of the accuracy in the feature tracking problem. Assuming that these velocities are known, how do we penalize the period of the low quality tracks?

For example, let $\textbf{p}_i\in R^3$ be $i_{th}$ 3d point and $\textbf{z}_{ij} \in R^2$  $j_{th}$ projected feature at $i_{th}$ camera pose.

Than, the objective function in the bundle adjustment problem is defined as

$\textbf{e} = \textbf{z}_{ij} - \pi(\textbf{T}_j\textbf{p}_i)$

If we know the velocity at $\textbf{T}_j$ how do we apply this information to the optimization?

An instant idea came to my mind is utilizing the velocity in terms of

$f = \textbf{e}^T\Sigma_j^{-1}\textbf{e}$

where the covariance is $\Sigma_j=I_{3\times3}v$. v is velocity. It might work but looks huristic.

Anyone knows a related literature?


问:
Quadcopter bldc PID control
Working on stabilizing a Quad using Arduino Due. I have slightly modified one of the examples of  Jeff Rowberg's library  to give yaw, pitch and roll angles (zero initialized angles). Moreover, I am using Servo library's writeMicroseconds() to send pulses to bldc's through ESCs. One observation I have made is that there is quite a difference between the starting pulse values of different ESCs. Roughly, the numbers for my 4 bldc's are 1650, 1680, 1720, 1780. So, in case the same pulse duration value of say 1780 is sent to all ESCs, one of them would just start, while the other three would be spinning at decent rpms.

 My aim is to implement PID control the speed of motors by measuiring these angles ( there is no remote control involved ). Also, the quad needs to rise up to a certain height setpoint and hover there.
So, the difficulty I am facing is that; my output speed looks something like this (just taking 1 motor here)

```<code>speed += ( ± Kp_yaw*yaw_error ± kp_pitch*pitch_error ± Kp_roll*roll_error ±height_speed)
//Height speed equals a small value, say, .5 if current height  < setpoint height else it's -.5 if current height > set height, otherwise 0, if height has been achieved.
</code>```

The ± depends upon motor's sense of rotation. Also, currently, I am using only P gain. The P constants for yaw, pitch and roll are different for all the 4 motors. the quad initially struggles for a few seconds to balance itself and rise, but eventually overturns towards the weakest motor (1650 one) each time. What's wrong with this code? Also, speed variable is also different for each motor and initialized to value of 1600 for each motor.

Title: Quadcopter bldc PID control


问:
Easy cm accurate GNSS / GPS for rover with base station?
I am trying to design a system to measure snow depth during snow production on a tiny ski resort in Denmark.

My idea is simple: Drive a rover over the ground during the summer, and obtain height data with lat long. During snow production, drive it again, and compare the height data with the height data from the summer. Provide snow depths to the people working, such that snowproduction can be optimal.

However, I need 1-2 cm accuracy in the vertical direction for this to be useful - and my readings have led me to believe I need to use a base station and RTK to get the needed accuracy. I expect the rover speed to be no more than 2 m/s (although higher speeds would be great, of course). I will (try to) design and build the rover to fit the project, so weight is not an issue, and I can probably add pretty large batteries to it. (The rover will need to reliably climb 30% snow covered inclines, and be able to either use GSM for communications or be able to communicate at least 500 meters using radio. It will also need to be robust enough to be covered in artificial snow during operation, etc.)

I have read a lot of blog posts and whatnot, that wants to use RTK lib and low cost receivers, but this question : Low-cost centimeter accurate satellite positioning (GNSS/GPS) - seems to suggest that this product : http://navspark.mybigcommerce.com/ns-hp-gl-gps-glonass-rtk-receiver/ - is sort of the solution to all my problems, wrapped in a simple package? (Its sort of cheap too, I think, at least not very expensive.) The question is from 2014 though, and it seems a lot have happened in this space since then?

I am sorry to ask a question that may be somewhat opinion based, but would a solution based on two NH-HP-GL be suitable for this project? (Denmark is in Europe, so I reckon it would have to be the GL model, right?). If yes, any recommendations on models, given the target speed of 2 m/s?

Also: I have not decided on what computing platform to base the rover on - any comments on Arduino or Raspberry (or entirely different) for this project? The biggest unknown in this project to me is the high accuracy GNSS, but radio communication from the base station to the rover is part of this and something I have not done with neither Arduino or Raspberry - so thanks for helping out.


问:
ROS: TurtleBot3 motors runs 60 seconds after message is seen in topic /cmd_vel
I am running ROS Kinetic, on a Turtlebot3 Burger with a Raspberry Pi3.

The goal here is to remotely control the Turtlebot from another Raspberry Pi. The remote controller Pi sends movement information over a socket connection.

I have delay problems when publishing into /cmd_vel (60 seconds delay) and again delay of 60 seconds from when the Twist message is echoed in the topic /cmd_vel to when the Turtlebot starts moving. I cannot locate why this 2 x 60 seconds delay occurs. I think that I might be pushing the raspberry pi too much.

If I do the following steps:
The Turtlebot3 is the ROS MASTER.
1. From remote SSH into the Raspberry Pi --> roslaunch turtlebot3_bringup turtlebot3_robot.launch
2. From remote SSH into the Raspberry Pi -- >roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch

Everything works fine no delays.

When I do:
The Turtlebot3 is the ROS MASTER.
1. From remote SSH into the Raspberry Pi --> roslaunch turtlebot3_bringup turtlebot3_robot.launch
2. From remote SSH into the Raspberry Pi -- >python post_office.py //python script posted below.
3. From remote SSH into the Raspberry Pi -- >rostopic echo /cmd_vel

The messages get into /cmd_vel with a 60 seconds delay.
The Turtlebot3 starts moving after 120 seconds delay.

When I do:
The REMOTE PC is the ROS MASTER.
1. roscore on remote pc
2. From remote SSH into the Raspberry Pi --> roslaunch turtlebot3_bringup turtlebot3_robot.launch
3. From remote SSH into the Raspberry Pi -- >python post_office.py //python script posted below.
4. Remote pc -- >rostopic echo /cmd_vel

The messages get into /cmd_vel with a 0 seconds delay.
The Turtlebot3 starts moving after 35 seconds delay.

env | grep ROS gives the following when Turtlebot3 is ROS MASTER:
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_MASTER_URI=http://192.168.1.39:11311
ROS_PACKAGE_PATH=/home/pi/catkin_ws/src:/opt/ros/kinetic/share
ROSLISP_PACKAGE_DIRECTORIES=/home/pi/catkin_ws/devel/share/common-lisp
ROS_HOSTNAME=192.168.1.39
ROS_DISTRO=kinetic

Here is the post_office.py running on the Turtlebot3.

```<code>import socket
import json
import rospy
from geometry_msgs.msg import Twist
import thread
import time

HOST = ''
PORT = 50007
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
s.listen(1)
conn, addr = s.accept()
print ('Connected by', addr)

twist = Twist()
lin = 0.0
ang = 0.0
pub = rospy.Publisher('/cmd_vel', Twist, queue_size=5) #queqe size can be adjusted maybe

def publish_cmd_vel():
    while not rospy.is_shutdown(): #checking the rospy.is_shutdown() flag and then doing work. You have to check is_shutdown() to check if your program should exit (e.g. if there is a Ctrl-C or otherwise).
        twist.linear.x = lin; twist.linear.y = 0; twist.linear.z = 0 #liniar has to be .x value to change
        twist.angular.x = 0; twist.angular.y = 0; twist.angular.z = ang #angular has to be .z value to change
        try:
            pub.publish(twist)
        except:
            print('unable to publish')

def recv_from_controller():
    while True:
        global lin, ang
        move_bytes = conn.recv(1024) #receive information as bytes
        move_info = json.loads(move_bytes) #decode into a dictionary
        lin = move_info['lin']
        ang = move_info['ang']
        print(type(lin), lin, type(ang), ang)

thread.start_new_thread( recv_from_controller, ())

rospy.init_node('post_office', anonymous = False)

while True:
    publish_cmd_vel()
</code>```

Any ideas to why I get these delays?


问:
Is missed step detection of a stepper motor done is software or hardware?
I remember seeing a video of the Prusa i3 Mk3 printer. It can detect when
the stepper motor misses a step, so it can home itself again.

I would like to know how this is done!

There are a few options I can imagine:

This can be done using standard stepper motors and stepper motor drivers, the detection is done entirely in software.

This can be done using standard stepper motors, but requires some extra circuitry as well as software.

This can only be done with special stepper motors and other components and special software.

Which option is correct? Any of the above, or something completely different? If you have any references, such a links, articles or blog posts on how to do missed step detection, it would be very interesting also!

ContentLicense: CC BY-SA 4.0


问:
DSO_ROS is not giving right coordinates after taking turn (left/right)
Hi all ,

i got stuck in a problem and really need your help.

Goal:
 I want to move little Toy vehicle autonomously (localization and mapping) and want to get distance covered by vehicle using DSO in real time. For now i want to move vehicle in square of 2x2 meters using dso_ros.

Work Done:
I'm getting coordinates of live camera by using dso_ros, I'm getting a matrix (camToWorld.matrix 3x4() in publishPoseCam SampleOutputWrapper.h), where first 3x3 is for rotations and last 3x1 is for translation(x,y,z if i'm not wrong).
When i move camera straight forward from any position then i got change in X-coordiante (it starts from 0.000 and ends on 0.7 when camera moved 2 meters forward ). Then i stopped it and take turn and move forward for 2 meters and so on (to draw square of 2x2 meters).

Problem:
When i take first turn (left/right) and then move it forward then no one coordinate gets change or update, dso gives me coordinates continuously but with very minor changes. I don't know which coordinate now i have to use to calculate distance after taking turn, so i get lost when i take first turn and not be able to draw square.  Please help me with this and guide me where i am wrong, I shall be very very thankful to you. I have been stuck in it from past 2 weeks.

Thanks.


问:
How does marginalization of variables effect least squares SLAM energy function?
Consider a simple example of Bundle Adjustment where I have robot and landmark poses $x = \left[ x_p \text{ } x_m\right]^T$ and measurements given by $z$, such that a simple factor graph can be generated with the nodes containing poses and edges containing the measurements. I'll have to solve for a non-linear least squares problem of the form $C(x) = \frac{1}{2}|| r(x) ||^2$ where $r(x)$ denotes the residuals.

I can implement and use any non-linear least squares optimization algorithm such as Gauss-Newton or use a popular library like ceres-solver.

My question is: Now suppose out of the state variables $x = \left[ a \text{ } b\right]^T$, I need to marginalize some variables $b$, while keeping the rest $a$. How do I apply this in terms of Gauss-Newton Algorithm and ceres-solver?

I understand the Gauss-Newton Algorithm and Schur Complement.
If the original covariance of the system is
\begin{equation} K =
\begin{bmatrix}
    A & C^T \\
    C & D
\end{bmatrix}
\end{equation}

Original Information
\begin{equation} K^{-1} =
\begin{bmatrix}
    \Lambda_{aa} & \Lambda_{ab} \\
    \Lambda_{ba} & \Lambda_{bb}
\end{bmatrix}
\end{equation}
Marginalized covariance $K_m = [A]$ and marginalized information $K_m^{-1} = A^{-1}$ where is $A$ is computed by the schur complement $A^{-1} = \Lambda_{aa} - \Lambda_{ab}\Lambda_{bb}^{-1}\Lambda_{ba}$.

Now, what do I do when new poses and measurements are added to the system and optimization is done?


问:
Position-Attitude Kalman filter with Quaternions
I want to design an EKF to estimate the position of a UAV. If I were doing this with Euler angles then I would have a state vector that would look like
\begin{bmatrix}north&east&down&vel_x&vel_y&vel_z&a_x&a_y&a_z&y&p&r& \omega_x&\omega_y&\omega_z\end{bmatrix}

With velocities and accelerations being in body frame and exactly like I obtain from the sensors. These would be connected to the position states via the angles of roll, pitch, yaw.

However, now I have quaternions and I don't know how to form the dynamical system. Based on what I have read the state has to be:
\begin{bmatrix}north&east&down&vel_n&vel_e&vel_d&a_n&a_e&a_d&q_1&q_2&q_3&q_4& \omega_x&\omega_y&\omega_z\end{bmatrix}

The relationship between $ \dot{q} $ and $q$ is
$ \dot{q} = \frac{S(\omega)}{2} q$, where

$S(\omega) = \begin{bmatrix}
0 & -\omega_x & -\omega_y &-\omega_z\\
\omega_x & 0 & \omega_z &-\omega_y\\
\omega_y & -\omega_z & 0 &\omega_x\\
\omega_z & \omega_y &-\omega_x&0\\
\end{bmatrix}$

So the major difference is that I use the world frame for the velocities and accelerations. I presume this would require a preprocessing step using the orientation of the vehicle to transform the measurements for acceleration from body frame to world frame during the kalman correction step. The Kalman filter is given measurements in world frame which is not exactly what I get from the sensors so I imagine my measurement noise will not be populated using values I get from a spec sheet but I will rather have to measure those. The nonlinearity in the system comes only from the $S(\omega)$ function. Does this sound like I'm on the right track?

If anyone has some tutorial that shows exactly how to do this I would greatly appreciate it.


问:
Is there a Kinfu version that runs with ROS on an Odroid?
I have a ROS-based robot that runs on an Odroid with a 3d Camera (Openni-based) and would like to use Kinfu (or something similar) on it. I'm not sure if the Mali-GPU is fast enough, but so far I didn't find an implementation that told specifically that it was used on an Odroid.

Does someone know such an implementation?


问:
EKF based Slam implementation with landmark identification in Global frame
I am working on mobile Robotics. I want to implement Slam. I have a very specific question about EKF Slam. To implement Slam I read the book "Probabilistic Robotics". I read its online version. There is a very well defined algorithm about EKF SLAM of known correspondence. But after read this algorithm again and again still fail to understand this algorithm, Especially where Landmarks portion is introduce. They are using range and bearing information to find out the landmarks (x,y) co-ordinates. This portion is little fishy for me. The value they get it is in Robot body Frame because the camera in attached with the Robot. So how could I get it Global Frame. I don't think there is any step in algorithm which transfer it to Global Frame. Any suggestion and discussion about this matter is most welcome.

Thank you in advance.


问:
Kalman filter and ekf main difference in elaborate way
I am studying about various filtering techniques for Robot pose esitimation. I came to know two very well known  filter technique Kalman Filter and Extended Kalman Filter. To know about this two technique I read Probalistic Robotics books.

Kalman Filter is a technique for filtering and prediction in linear system.

Extended Kalman Filter is a technique for filtering and prediction of non-linear system.

This two definitions are not very clear to me. So I googled the term linear and non-linear system

Linear System- A linear system is a mathematical model of a system based on the use of a linear operator.

Non-Linear System: In mathematics and physical sciences, a non-linear system is a system in which the change of the output is not proportional to the change of the input.

Now both definitions are very fishy for me. They are the well structured definition but not very efficient for mobile robot.

Can any one guide me about linear and nonlinear system from scratch or from naive level. I want to know this term in concept of Mobile Robotics and Kalman filter and extended Kalman filter.  Any practical example is most welcome.


问:
Algorithm for orientation (pan/tilt) towards a moving point

Main Question:

note: The code in this question is pseudo-code, I'm using Python, but my pseudo-code is a mix of Python and C++.

I have a camera on the top of my robot's "head" which has pan and tilt capabilities as follows:

```<code>move_head(int pan_degrees, int tilt_degrees);
</code>```

For example, when I call move_head(30,-20) the robot's head will move 30 degrees to the right and 20 degrees down, from the current position.

Importantly: When a current movement command is underway, the next available command waits for it to complete before executing.

The camera is tracking a moving object (usually a person, but for this demo I'm just tracking a Red Ball for simplicity) and must tell the head which direction to move to keep the point as centered on the screen as possible. I get the object's current central point (centroid) as a pair of integers:

```<code>int x; //pan
int y; //tilt
</code>```

I also have the center point as a pair of constant integers:

```<code>const int x_center;
const int y_center;
</code>```

As you may have noticed, the function above does not have velocity controls in its parameter list and so the head moves only at pre-defined speeds (not slow, but I'm trying to remove jerky behavior).  There is also a "full stop" function, but because of my desire to have no jerky behavior I'm hoping not to need to use it.

My approach so far has been to define thresholds across my input image, such as:

```<code>int xthreshold = 600; // pixels
</code>```

When the point crosses a threshold, I would calculate the difference in position:

```<code>if(x > xthreshold):
 int new_x = x - x_center; //new x
 int new_y = y - y_center; //new y
 move_head( new_x, new_y); //move to new position
</code>```

However, this is an extremely primitive algorithm.  I imagine I could use a statistical method, or the current velocity of the object at the time of measurement, to predict a slightly more accurate new point than simply using the current difference from the center.

Addendum:

My code base is large and complex and I'm not personally familiar with the many layers of classes involved in the definition of my move_head function.  However, if anyone knows of an amazing algorithm that does what I'm talking about that uses additional parameters, I would really love to hear about it.

My guess is that a definition such as:

```<code>move_head(int pan_degrees, int pan_velocity, int tilt_degrees, int tilt_velocity);
</code>```

or

```<code>move_head(int pan_velocity, int tilt_velocity);
</code>```

or

```<code>move_head(int pan_acceleration, int tilt_acceleration);
</code>```

may have a more intuitive implementation of an effective point tracking algorithm.

Additionally, would it be more useful to have my function update the desired destination mid-movement instead of blocking until movement is complete?


问:
ROS: joint_state_publisher dies when used in remote launch file
I've been trying to run robot_state_publisher and joint_state_publisher on a remote TX1 running Ubuntu 16.04 and ROS Kinetic. When running the node from a local launch file (manually ssh into the remote machine and run launch file), everything runs fine. However, when I try to run a launch file from my local machine (launches nodes from remote machine using the < machine > tag), I get this error in my terminal:

[192.168.1.237-0]: [robot_state_publisher-28] process has died [pid
  26798, exit code 255, cmd
  /opt/ros/kinetic/lib/robot_state_publisher/state_publisher
  __name:=robot_state_publisher log:=/home/nvidia/.ros/log/038bfbd8-7afb-11e8-b9f2-ac220b57ae89/robot_state_publisher-28.log].

log file:
  /home/nvidia/.ros/log/038bfbd8-7afb-11e8-b9f2-ac220b57ae89/robot_state_publisher-28*.log
  [192.168.1.237-0]:  [joint_state_publisher-27] process has died [pid
  26780, exit code 1, cmd
  /opt/ros/kinetic/lib/joint_state_publisher/joint_state_publisher
  __name:=joint_state_publisher log:=/home/nvidia/.ros/log/038bfbd8-7afb-11e8-b9f2-ac220b57ae89/joint_state_publisher-27.log].

log file:
  /home/nvidia/.ros/log/038bfbd8-7afb-11e8-b9f2-ac220b57ae89/joint_state_publisher-27*.log

How can I fix this? Here's my launch file:

```<code><launch>

    <!-- ROS parameters -->
    <!-- remote machine (wheatley) -->

    <group>
        <machine name="wheatley" address="192.168.1.237" env-loader="/home/nvidia/catkin_ws/devel/env.sh" user="nvidia" password="nvidia" default="true" />
        <include file="freenect.launch"/>
                    <arg name="depth_registration" value="true" />
                    <arg name="publish_tf" value="false" />
        <include file="mpu_9250.launch" />

        <arg name="model" default="wheatley.urdf"/>

        <param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model)"/>

        <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
                <param name="use_gui" value="false" />
        <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
            <param name="use_gui" value="false" />

            <!-- IMU frame: just over the RGB camera -->
            <!--node pkg="tf" type="static_transform_publisher" name="rgb_to_imu_tf" args="0 0.0 0 0.0 0.0 0.0 /sensor_link /imu_link 50" /-->

            <arg name="pi/2" value="1.5707963267948966" />
            <arg name="optical_rotate" value="0 0 0 0 0 0" />
            <node pkg="tf" type="static_transform_publisher" name="optical_rotation" args="$(arg optical_rotate) /sensor_link /camera_link 50" />

        <include file="rtabmap.launch">
            <arg name="rtabmap_args" value="--delete_db_on_start"/>
        </include>
    </group>

</launch>
</code>```

Here's the error traceback on the robot:

```<code>Traceback (most recent call last):
  File "/home/nvidia/catkin_ws/src/joint_state_publisher/joint_state_publisher/joint_state_publisher", line 474, in <module>
    jsp = JointStatePublisher()
  File "/home/nvidia/catkin_ws/src/joint_state_publisher/joint_state_publisher/joint_state_publisher", line 149, in __init__
    robot = xml.dom.minidom.parseString(description)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
TypeError: Parse() argument 1 must be string or read-only buffer, not None
</code>```

**EDIT: ** Here's the error from robot-state-publisher:

[ERROR] [1530379066.805335879]: Could not find parameter robot_description on parameter server


问:
How to update a new pose in iterative pose optimization problem?
There are multiple ways to update new pose in iterative pose optimization problem. The easiest one we often find in papers in robotics is as

SO3 + translation

Update on right
\begin{equation}
\begin{split}
\textbf {R}' &= \textbf{R} \textbf{e}^{[\boldsymbol{\omega}]
_\times}, \textbf {t}' = \textbf{t} + \delta\textbf{t}
\end{split}
\end{equation}

Update on left
\begin{equation}
\begin{split}
\textbf {R}' &= \textbf{e}^{[\boldsymbol{\omega}]
_\times}\textbf{R} , \textbf {t}' = \textbf{t} + \delta\textbf{t}
\end{split}
\end{equation}

where $\delta\textbf{t}\in R^3, \boldsymbol{\omega}\in R^3$ are estimated update on the pose with $\textbf{R}\in SO(3),\textbf{t}\in R^2$.

But there are other ways as well, such as

SE3 Matrix update

Right side update $\textbf {T}'=\delta\textbf{T}\textbf{T}$

\begin{equation}
\begin{split}
\textbf {T}' &=\delta\textbf{T} \textbf{T}=
\begin{bmatrix}
 \textbf{e}^{[\boldsymbol{\omega}]
_\times}&\delta\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
\begin{bmatrix}
 \textbf{R}&\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
=\begin{bmatrix}
 \textbf{e}^{[\boldsymbol{\omega}]
_\times}\textbf{R}&\textbf{} \delta\textbf{t}+\textbf{e}^{[\boldsymbol{\omega}]
_\times}\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
\end{split}
\label{eq:disp}
\end{equation}

\begin{equation}
\begin{split}
\textbf {T}' &=   \textbf{e}^{[\boldsymbol{\xi}]_\times} \textbf{T}=
\begin{bmatrix}
 \textbf{e}^{[\boldsymbol{\omega}]
_\times}&\textbf{V} \delta\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
\begin{bmatrix}
 \textbf{R}&\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
=\begin{bmatrix}
 \textbf{e}^{[\boldsymbol{\omega}]
_\times}\textbf{R}&\textbf{V} \delta\textbf{t}+\textbf{e}^{[\boldsymbol{\omega}]
_\times}\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
\end{split}
\end{equation}

Left side update $\textbf {T}'=\textbf{T}\delta\textbf{T}$

\begin{equation}
\begin{split}
\textbf {T}' &=  \textbf{T}\delta \textbf{T}=\begin{bmatrix}
 \textbf{R}&\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
\begin{bmatrix}
 \textbf{e}^{[\boldsymbol{\omega}]
_\times}&\delta\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
=\begin{bmatrix}
 \textbf{R}\textbf{e}^{[\boldsymbol{\omega}]
_\times}&\textbf{R}\delta\textbf{t}+\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
\end{split}
\end{equation}

\begin{equation}
\begin{split}
\textbf {T}' &=  \textbf{T}\textbf{e}^{[\boldsymbol{\xi}]
_\times}=\begin{bmatrix}
 \textbf{R}&\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
\begin{bmatrix}
 \textbf{e}^{[\boldsymbol{\omega}]
_\times}&\textbf{V} \delta\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
=\begin{bmatrix}
 \textbf{R}\textbf{e}^{[\boldsymbol{\omega}]
_\times}&\textbf{R}\textbf{V} \delta\textbf{t}+\textbf{t} \\
\textbf{0}&1
\end{bmatrix}
\end{split}
\end{equation}

se3 6x1 pose update($\boldsymbol{\mathfrak{I}}^{-1}$ could be left or right jacobian)

\begin{equation}
\boldsymbol{\xi}'=\boldsymbol{\xi} + \boldsymbol{\mathfrak{I}}^{-1}\boldsymbol{\xi}
\end{equation}

My question is that which one is most stable or prefered.
If you know any reference toward this problem, please let me know.

Thanks!


问:
Making a robotic arm that can draw a circle
I am software engineering student and don't know much about hardware.

I recently have started a project in my AI course. The project is playing a 3x3 tic-tac-toe game between computer and a human.

In a tic-tac-toe board, suppose you play first and you put a cross mark in a certain place.(in tic-tac-toe board your position is (3,1)).
 Now my computer will take a picture with webcam and analyse this picture with help of Opencv(It is a open source c++ library for image processing. for details opencv.org). After finding the position of your cross mark it will find the optimal position with the help of my algorithm at which it will put a circle. For output it will just speak out the position.

Now, I want to make a robotic hand that can draw this circle as output. Would anybody please help me to find the hardware and other materials that needed to make that robotic hand? It will be very helpful if anybody suggest me some tutorials.

I Googled and found many many suggestions, but I am confused about what to choose.


问:
How to calculate the forces acting on an object of mass 'm', which is vacuum gripped at the end of a robot arm?
I would like to understand, how to calculate the forces/what all forces act on an object that is currently being gripped by a suction gripper and when it moves. Gravity is one, which will cause the object being gripped to fall, the angular velocity will try to move the object away from the eef, the suction force will try to retain the picked object. Is there a formula that ties all of these together and form a threshold, beyond which the gripped object will definitely fall.</p>


问:
Strategy for 3D path planning over large distances with kinodynamic constraints
I was hoping to pick your brains about a problem that even after much reading has left me baffled.

My Application:
For the sake of simulating underwater scenarios in very large environments (up to 100 km by 100 km in the X-Y plane), I am attempting to implement a path planner capable of planning a path that brings an underwater vehicle such as a submarine from a the starting position to a final 3D waypoint while avoiding obstacles. The vehicle will have high level knowledge of the map for things like the location of the ocean floor, and will sense other obstacles as it moves through the environment. The environment will not be obstacle dense, but they can be moving (other submarines, etc)

My general problem:
Underwater vehicles such as submarines have significant kinodynamic constraints associated with them. This makes using strictly geometric planners such as RRT*(the geometric version anyway...) or D*-Lite unrealistic, since the generated path could be entirely unimplementable by the vehicle even after smoothing. However, kinodynamic path planners cannot be reasonably applied over such large distances due to their computational complexity, especially in the context of new obstacles potentially being discovered all the time, requiring repairing or re-planning of the path. Are there standard methods for dealing with these type of complex scenarios that I am unaware of? Otherwise, can anyone propose a strategy well suited to this type of problem? Thank you.

One idea I had was to use a geometric planner like RRT* as a 'global' planner' that generates a coarse plan that would then be roughly followed by a 'local' kinodynamic planner such as RRT-X. The local planner would ensure nearby obstacles are avoided while adhering to the constraints of the vehicle. I am a complete novice in this area though so I am unsure if even that is reasonable.


问:
Trajectory following using LQR - Setting horizon time and intermediate points
I was going through UC Berkeley's CS287 - Advanced Robotics course. In particular - Optimal Control for
Linear Dynamical Systems and Quadratic Cost
(“LQR”)
 by Pieter Abbeel (Slide 10).

Let us say we use LQR to go from point A to point B. The motion planner will probably output a trajectory, which we will follow using LQR. In the finite horizon discrete time case, how do we set the value of total time horizon $T$, and the value of each time step $\delta t$, and the waypoints $x^*_t$ to follow?


问:
How to apply Kalman filter in this case?
I have some straight and curve pieces with numbers, they are used to build tracks (of $5$ lanes) for my cars (figure $1$), I can send commands to the cars using an SDK on the Raspberry (set the speed for example ...), when a car is moving, a built-in downward facing camera scans the infrared markings on the track, a microcontroller inside the car decodes these markings to get the id of the position on the piece (see figure $2$) and the number of the piece, then a message PM=(piece number, position id, car linear velocity) is sent via Bluetooth low energy to a Raspberry. The car can send these messages AT LEAST every $0.2$ second. The problem is that the car can reach a linear velocity of $100cm/s$ and move quite a distance after it sends the PM message, so it will be a lag between the actual state of the car and the state contained in the received PM message.
There is also the problem of delayed and lost packets containing PM messages because we use one Raspberry to communicate with $3$ cars via Bluetooth low energy (sometimes the Raspberry keeps receiving packets from one car even if the others try to send), which makes the lag larger. So, we cannot rely only on the received PM messages to determine the real-time position of the car.

Therefore I am trying to implement on the Raspberry a Kalman filter to estimate the position of the car on the track in real-time, but given the fact that I don’t have the $(x,y)$ coordinates of the car I don’t know how to apply the algorithm using (position id, number of the piece), also I want to know how to do so the update step can take into account the delayed and lost measurements.

When the car leaves a piece, it sends the wheels displacements but it is not sufficient I think, I have neither the heading nor the angular velocity of the car.

There is one thing that I think is very useful; if no commands are sent to the car, the microcontroller inside it ensures that the car will keep moving on the same lane and tries to maintain its linear velocity.

I would like to have your advice, opinions or ideas of another filter or algorithm, if you have any question, please ask me.


问:
How to make a motion sensor circuit, that can communicate with my LAN?
I'm a newbie to Electronics/ Robotics, but I love to do it as a hobby.

So I want to build a circuit (a really small in size would be much better) with a motion sensor that can communicate data (Basically when it sense a motion send a signal) to my computer over Wifi. Is this something possible?
If so how do I do it, may be a schematics diagram, or someway to start the project would be a grate help.

Thank you!!


问:
Stability of dynamical system via Lyapunov
I have a dynamical system which has the following form:

$\dot x=\mathcal F_1(m_1)x+\mathcal F_2(m_2)x$.

My objective is to find the parameters $m_1$ and $m_2$ via LMI (linear matrix inequality)  using the Lyapunov function $V=x^TPx$ where $x$ is the state and $P$ is a  positive definite matrix. The problem that I can't find a feasible solution with a single matrix $P$. I tried to solve the problem with tow steps:

I consider that $\dot x=\mathcal F_1(m_1)x+\omega_1$ then using the Lyapunov function
$V_1=x^TP_1x$ (of course using the mathematical background) I can find the first parameter $m_1$;

I consider that $\dot x=\mathcal F_2(m_2)x+\omega_2$ and as in the first step I can find the second parameter $m_2$ using the Lyapunov function $V_2=x^TP_2x$ and using them in the simulation they work very well.

My questions are about:

$m_1$ and $m_2$ were found independently how can I guarantee
the stability of the system using $m_1$ and $m_2$ in other words how can I prove the stability of the system?

It is well known that the Lyapunov function is also so called the energy of the system so can I say that $V=\frac{1}{2}(V_1+V_2)$ is also the energy of the system?


问:
Lost on SEIF Slam repeated update landmark
I am working on Sparse Extended Information Slam. I take the reference from Probabilistic Robotics, by Dr.Sebastian Thrun (Chapter 12,page 303). I have some doubt about the implementation of the algorithm. There is a concept of passive landmark and active landmark.

As per the picture at $x_t$ position it sees $y_1$ and $y_2$ and update the matrix as per requirement. Now, lets say that the robot can see landmark $y_1$ again at $x_{t+10}$ position. Then the information matrix $\Omega$ change the $x_t$ vector as $x_{t+10}$ but what happened with the $y_1$ cells row and column?

I cannot figure it out after reading the algorithm several times.


问:
How to calculate a covariance of trajectory?
I have a drifted LiDAR odometry $^w \textbf{T}_{1:k}\in SE(3)$ and a drift corrected LiDAR odometry $^w \textbf{T}'_{1:k}\in SE(3)$ by a loop closure where w represents the reference world frame.

Given an uncertainty or noise level $\Sigma_{6\times6}$, we can predict the possible range of the current location by propagating this uncertainty.

My question is how to calculate the uncertainty $\Sigma_{6\times6}$.

Currently I am just calculating the error of frame to frame motion in $se(3)$ and calculating a 6 by 6 covaraince from it.

$e_n=log((^n\textbf{T}_{n+1})^{-1}\textbf{T}'_{n+1})$

For the pose propabation I will use on se3 pose compounding method by Timothy Barfoot (according to his state estimation book chapter 7.3.3 Compounding Poses). The book is here.

I guess this topic is well established in EKF localization problem. Any idea and thoughts will be appreciated.


问:
Calculation of accuracy during dead reckoning based for sensor selection
I am working on a problem in robot tracking, where our main position sensor will be unavailable for up to a second due to its low frequency.
That's why we would need to track its 2D-movements (x&y-axes) during these intervals using an accelerometer. I think the right term for this process is called dead reckoning. In case I lack additional sensors, I probably have to take the double integral of the acceleration...

What I am looking for, is a way to estimate the needed sensor-accuracy to achieve a defined tracking accuracy (say 10mm).
Does maybe a closed form expression exist? Or is there any general work on this topic? (I couldn't find anything)
The only method of doing this that I can think of would be simulating a test trajectory for the sensors and calculate the accuracy. But that would require to run a simulation of every possible sensor candidate...