问:
Stepper motor not working
I have recently purchased some stepper motors and drivers. The link to them is here.

Stepper motor driver

Stepper motor

In addition to this i have this power source

Power source

The problem that is happening is that the stepper motor isn't turning. It sometimes mikes a really loud high-pitched noise. However, because of this, i though the driver might be dead, so i purchased a different driver and motor. The stepper motor still isn't turning but the high pitched noise is gone. The stepper motor is on however, because  there is still a bit of noise.

I am using a raspberry pi 4b 8 gb to control the driver. I am using rpimotorlib.  The code i use is copy and pasted from another source.

import RPi.GPIO as GPIO

from RpiMotorLib import RpiMotorLib

import time

direction= 22

step = 23

EN_pin = 24

mymotortest = RpiMotorLib.A4988Nema(direction, step, (21,21,21), "DRV8825")

GPIO.setup(EN_pin,GPIO.OUT) # set enable pin as output

GPIO.output(EN_pin,GPIO.LOW) # pull enable to low to enable motor

mymotortest.motor_go(False, # True=Clockwise, False=Counter-Clockwise
                     "Full" , # Step type (Full,Half,1/4,1/8,1/16,1/32)
                     200, # number of steps
                     .0005, # step delay [sec]
                     False, # True = print verbose output
                     .05) # initial delay [sec]

GPIO.cleanup()
```

I don't really know why this isn't working, i am follwing the schamatic, i am pretty sure that the current in the supply and controller are fine and the code should work.

Any advice on how to get the stepper motor to turn would be much apreciated.

Title: Stepper motor not working


问:
Need to automate some simple actions of a drone
I am working on a student&enthusiast project that includes the participation of a few drones (copter-type). Right now, there is nothing complicated in their movements, just, for example 100 meters forward, 20 meters upward, rotate 90 degrees left, 50 meters forward etc.

I really need to automate it. But for now, I am dealing with ordinary cheap drones from al****express (and maybe I will be stuck with them forever, haha), so I have no ardupilot or px4 abilities to set up some specific flight missions.
Is there something that I still could do?

ContentLicense: CC BY-SA 4.0


问:
Stereo Bundle Adjustment
When doing stereo based visual odometry and bundle adjustment how does the stereo constraint get factored into the photometric error?

Do you use the fact the second cameras location is known wrt the first or is something else done?

Title: Stereo Bundle Adjustment


问:
Stepper Motor Stops rotating after some time on KK 2.1.5 Quadcopter flight controller
I am developing a quadcopter for image capturing.
I am using a KK 2.1.5 flight controller with A2212/13T 1000KV motor and lithium ion 2300 mAh battery .

My quadcopter flies steadily but after 12-15 seconds the bottom right motor stops rotating which causes the quadcopter to crash.

I have replaced the motor twice but to no use and am unable to find the issue .

I have also noticed that once that motor has stopped if i reduce the throttle to 0 and then back up again the motor rotates again.

I want to understand what is going wrong and how to fix it.

Thanks


问:
PID controller error calculation when the setpoint and the process variable both grow over time
Suppose I have a robot which can perform some work and be rewarded with a point 50-70% of the time. I want a different number of points to be collected every hour of the day. This is modelled using a function which tells me the number of points I expect to have at time t, giving setpoint(t), which grows from 0 points in the first minute of the day to 100,000 points by the end.

My process variable is the number of points I have collected so far. The process input is the intensity of the work required to reach the desired number of points at the time.

The problem with my current error calculation (total points expected to be collected by current timestamp - points collected so far) is that the PV being twice the setpoint in the first hour results in a significantly smaller error compared to an overshoot of the same magnitude in the last hour.

How should I modify the error to minimise fluctuations caused by both SP and PV growing over time? Would 1 - PV/SV work?


问:
For robot manipulators what is the relationship between angular velocity and time derivative of quaternions?
For a robot manipulator with joint angles $\theta$, the well-known relationship is

$$\omega = J_\omega(\theta)\dot{\theta}.$$

What if the angular velocity is represented as the time derivative of quaternions $\dot{q}$? What is the relationship between $\omega$ and $\dot{q}$?

We can also write the Jacobians w.r.t to the quaternions, i.e.,

$$\dot{q} = J_{q}(\theta)\dot{\theta},$$

what is the relationship between $J_\omega(\theta)$ and $J_{q}(\theta)$?


问:
Charging station flashing green. Not charging
Charging station is flashing green. Roomba’s makes clicking sounds with error message. Have another charging station and the Roomba's charges there fine. I also move another Roomba ( have a total of 3) and they all do the same thing within this particular charger. I have cleaned the contacts frequently with smooth sanding paper and pencil eraser.</p>


问:
Are the DH-parameters correct?

strong text
strong text

[![ My attempt ] 2]2

Title: Are the DH-parameters correct?


问:
Is it possible to add a custom step between each optimization iteration with Google's Ceres
Say you have to implement a structureless approach(in the context of Bundle Adjustment) with Google's Ceres.

The structureless approach requires adding a step that re-triangulate all features and marginalizes the feature from the state.

Is it possible to implement such a custom iteration with Ceres?


问:
Outlier rejection of fisheye stereo feature, how to do it?
OpenCV provides a nice outlier rejection feature with findFundamentalMat function. But that's for the pinhole projection model.

How do we detect the outliers around the edge of the image circle where the feature incident angle is near 180 degrees?

By finding ray to ray intersection and seeing the min distance between the two rays? Is there any simpler method?


问:
How to transform given latitude and longitude data to map frame
I am working with a multi sensor RTK-GNSS for localization of my robot.

This is the data I am getting from the GNSS system.

How to relate this data to my robot map frame for navigation?


问:
gzclient: Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
This warning:

```<code>gzclient: Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
</code>```

is happening whenever I run my robot simulation with Gazebo. I'm spawning a robot from an URDF.

Any idea in how to remove this warning? or why is it happening? No idea what connection is referring to...

Is it something I should be worried about?

Gazebo11

ROS2 humble

Ubuntu 22.04


问:
The mobile robot doesn't reach to the max speed
The youBot mobile robot is being used to test some kinematic controllers. There is a problem with the base not reaching the maximum speed. A maximum linear velocity of 1.5 is defined in the configuration file.

```<code>  type: steered_wheel_base_controller/SteeredWheelBaseController
  base_frame: base_footprint
  linear_speed_limit: 1.5
  linear_acceleration_limit: 2.5
  linear_deceleration_limit: 2.5
  yaw_speed_limit: 3.0
  yaw_acceleration_limit: 3.2
  yaw_deceleration_limit: 3.2
</code>```

The maximum speed reported by Gazebo for the platform when I test it is 0.47 whereas the commanded linear velocity in x-axis is 2 and the rest is zero.

```<code>name: [ground_plane, youbot]
pose:
   ...
twist:
  -
    linear:
      x: 0.0
      y: 0.0
      z: 0.0
    angular:
      x: 0.0
      y: 0.0
      z: 0.0
  -
    linear:
      x: 0.475034689787  <----- current speed in x-axis direciton
      y: -0.00392167360465
      z: -0.0205054274451
    angular:
      x: 5.50872400881e-06
      y: 0.000846332345603
      z: 7.43291489694e-05
</code>```

There is no impact from increasing the PID's gains. The controller is a customised one called steerable_wheel_base_controller.cpp in the same package. Any suggestions?

Melodic ROS, Gazebo 9, Ubuntu 18.04.


问:
How to access the values of a batterie of a charger within the controller.py?
I have a mobile robot and I want him to learn: Green-light = Energie = I should drive towards it.

In the beginning the robot drives arround randomly and when it  enters a Charger it connects getting charged with the light it is seeing. Which is green in the beginning and red in the end. I would like to get the charger capacity and capacity status for my controller.py. So that I can weight the learning effect based on how much energie is there and left at any moment of the charge. And there are miltiple charger.
I am using the R2023a Version.

The robot can already drive towards the learned color i would only like to weight its learing experience based on the amount of energie inside the charger it is getting charged from. So I need the python command to access these values.

Now it learns that geen and red are equally important because it is getting chared while green gradually changes to red. So it connects also red to Energie = Drive towards. But I want that the robot seares for the most energie in the Area which sould be a green one not the empty red ones.

On another note is it possible to display a green light with the charger untill it is fully empty. Now when its full it is green. If I disable the gradient change than it becomes red imidiatly while still charging. I would like the batterie to become red only if its fully empty.


问:
Hole detection on ROS with a stereo camera
I am trying to make a node in ROS that has as input a dynamic point cloud that is generated with a stereoscopic camera to which I have performed preprocessing. Now that point cloud that is generated usually has holes which I should detect. I've been working with PCL for a couple of months looking for a way to detect these holes in real time but I still haven't succeeded. Could someone suddenly give me a suggestion or recommendation to address this issue</p>


问:
How to use the piecewise function to control the rotation motor in webots?
I am creating a Webots robot controller by using C language and trying to use piecewise functions to control two rotation motors and simulate the swinging motion of a leg. One motor for the hip and another one for the knee. However, the motors only work with the "else" condition. Can anyone tell me where I am wrong?

This is the code:

```<code>#include <webots/robot.h>
#include <webots/motor.h>
#include <math.h>

#define TIME_STEP 64

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

  WbDeviceTag Right_Hip = wb_robot_get_device("RightHip");
  WbDeviceTag RightUpperKnee = wb_robot_get_device("RightUpperKnee");

  double t = 0.0;  // elapsed simulation time
  int k = 0;

  while (wb_robot_step(TIME_STEP) != -1) {
    double RightHipPosition;
    double RightUpperKneePosition;

    if ((t >= (0 + 4 * k * M_PI)) && (t <= (12/5 * M_PI + 4 * k * M_PI)))
      RightHipPosition = (35 * cos(0.417* t )+ 30)* (M_PI / 180.0);
    else
      RightHipPosition = (35 * sin((0.625) * t )+30) * (M_PI / 180.0);

    if ((t >= (0 + 4 * k * M_PI)) && (t <= (6.241 + 4 * k * M_PI)))
      RightUpperKneePosition= -30 * (M_PI / 180.0);
    else if ((t >= (6.241 + 4 * k * M_PI)) && (t <= (2.4 * M_PI + 4* k * M_PI)))
      RightUpperKneePosition =(30 * sin (0.417 * t ) )  * (M_PI / 180.0);
    else
      RightUpperKneePosition =(-30 * sin (0.675 * t ) )  * (M_PI / 180.0);

    wb_motor_set_position(Right_Hip, RightHipPosition);
    wb_motor_set_position(RightUpperKnee, RightUpperKneePosition);

    t += (double)TIME_STEP / 1000.0;
    k = k + 1;
  }
  wb_robot_cleanup();
  return 0;
}
</code>```


问:
Calculating Translation and Rotation in Tool Coordinate System
I have a 6-axis robot that moves from P1(x1,y1,z1,q11,q12,q13,q14) to P2(x2,y2,z2,q21,q22,q23,q24) with tool offset T(x,y,z,q1,q2,q3,q4). I know the base coordinates and orientation of both positions. What I am trying to achieve is to find a way to calculate how much distance that robot travels in x,y,z direction and how much it rotates in q1,q2,q3,q4 in tool coordinates of the robot. How can I calculate it given positions and tool offset?</p>


问:
Is it possible to use high frequency antennas with low frequency RFID readers
I'm going for something similiar to this TRF7960A RFID MultiplexerExample System.

Is it possible to use the same TRF7960A RFID device (or any other 13.56 MHz reader) with a sub GHz (UHF RFID) antennas?


问:
Create A Half Cylinder in PyBullet
I would like to ask if it is possible to use the PyBullet function createCollisionShape to create a half cylinder in PyBullet? If so, how should I do that?

Or, is there any other function in PyBullet that can help me create a half cylinder?

I am trying to connect a half cylinder body with my existing robot structure, but I do not know how to create that in PyBullet.

Thank you very much for the help!

Title: Create A Half Cylinder in PyBullet


问:
Mono Slam scale tracking
How is the scale tracked in monoecular slam algorithms between image pairs?

It appears the 5point algorithm is used to initially compute the first two cameras poses but after that you want to maintain scale consistency between subsequent frames thus the 5point algorithm is no longer appropriate.

So how does this work?

Title: Mono Slam scale tracking


问:
What components and valves do you need for this pneumatic system of 4 actuators powered by commands and distributed in 2 lines?
I was designing a pneumatic system, fed by a compressor (Tank = 6 liters, Pmax = 8 bar, Motor power = 1.5 HP, Flow = 180 l/min), and consisting of its FRL, some hoses for the ducts 4 mm standard polyurethane, and four cylinders (actuators).

Of which, two of the cylinders are arranged in serie on one of the branches of the pneumatic circuit and the other two also in series but in the other branch (but both branches fed from the same compressor).

And when I was needing is that by a command the two cylinders of one branch extend or retract at the same time, and that with another independent command the other two cylinders of the other branch contract or retract at the same time.

What type of components (valves and others...) would you need for a circuit of these characteristics, where the response speed of the actuators is an important factor?

It is important that the pneumatic pistons maintain their position until the opposite action is indicated.


问:
Homogeneous transformation matrix problem
I have a problem with homogeneous matrices.

I have a system composed by three bodies (1, 2 and 3) and I would like to find the rotation axis between body 1 and body 2. Body 2 is attached to body 1 and 3 with spherical joints, while bodies 1 and 3 on the other side are attached to ground (=fixed reference frame, denoted with 0) with cylindircal joints. Bodies 1 and 3 can only rotate around the axis of cylindrical joints, while body 2 rotates and traslates with respect to reference frame.

Knowing the coordinates of the bodies in two different steps (i and i+1) with respect to RF0, I can create two other reference frames, RF1 which belongs to the body 1 and has the origin fixed with the spherical joint, and RF2 which belongs to body 2. Homogeneous matrices denoted with A describe the system for the first step (i), while B matrices describe the position relative to the second step (i+1).

My approach to this problem is the following:

Knowing ${}^0A_1$ and ${}^0B_1$ and ${}^0A_2$ and ${}^0B_2$ (4x4 matrices) I can determine ${}^1A_2$ and ${}^1B_2$ with:
$$
{}^1A_2={}^0A_1^{-1}*{}^0A_2
$$
$$
{}^1B_2={}^0B_1^{-1}*{}^0B_2
$$
Then I can determine the transformation matrix necessary to "move" the RF2 from step (i) to step (i+1)
$$
{}^1RT_2={}^0A_2^{-1}*{}^0B_2
$$
This matrix is a roto-translation matrix, so I can split the matrix into 2 matrices, one for the translation and one for the rotation:
$$
transl(s)=\left[ {\begin{array}{cc}
    1 & 0 & 0 & {{}^1RT_{2}}_{1,4}\\
    0 & 1 & 0 & {{}^1RT_{2}}_{2,4}\\
    0 & 0 & 1 & {{}^1RT_{2}}_{3,4}\\
    0 & 0 & 0 & 1\\
  \end{array} } \right]
$$
and
$$
rot(h,\theta)=transl(s)^{-1}*{}^1RT_2
$$
Once the rotation matrix is known, I can compute the axis of rotation $h_2$ and finally I can determine $h_0$:
$$
h_0={}^0A_2[1:3,1:3]*h_2
$$
The problem with this approach is that I expected to find a rotation axis that is coincident with the spherical joints, while from calculations I have an error around 6 mm in x direction and 0.6 mm in y direction for the same z coordinate (with a distance between spherical joints around 320 mm).

I found that the problem occurs if body 1 moves between step (i) and step (i+1). Probably the error is in the last part:
$$
h_0={}^0A_2[1:3,1:3]*h_2
$$
and using the matrix ${}^0A_2$ is not correct if reference frame 1 changes position. Maybe I need to find an intermediate position of reference frame 1, defined with ${}^0C_1$ so that
$$
{}^0C_2={}^0C_1*{}^1A_2
$$
and then
$$
h_0={}^0C_2[1:3,1:3]*h_2
$$


问:
connect esp32 remotely without any hosting services
i am trying to access my esp32 cam remotely but don't want to use any hosting servers like ngrok like that. I wish that hosting be done by esp32 only like it should host a webserver and will be able to access from anywhere i don't want to run any software on my computer or in the cloud.

is there any method?

and i am using this code

https://github.com/s60sc/ESP32-CAM_MJPEG2SD


问:
What is the best way to checkpoint node parameters for rosbag MCAP format?
I am logging data in MCAP format using ros2 bag record -s mcap --all which saves a .mcap file with all my logged data as well as a metadata.yaml file with some info about what is stored in the .mcap file.

I would like to "checkpoint" my system when I save the data by somehow saving all the ROS parameters along with these files that come from ros2 bag record. However, in ROS2 there's no longer a global parameter server and each node has a way of interacting with its own local parameters (see About parameters in ROS 2). Is there a standard way to save all ROS parameters from all nodes so that I could have this info in my logs?

I'm about to work on a script to hack such behavior together, and would like to know if I'm wasting my time, that maybe there is already a reasonable solution to this problem that I'm unaware of. Thanks!


问:
Grasp matrix implementation
I've majorly followed Dex-net implementation to calculate a grasp matrix (G) to compute other grasp quality metrics (e.g., Ferrari Canny L1 metric or smallest singular value of G).

Based on my understanding after searching documents and papers, grasp matrix is a 6xM matrix that transforms forces applied on contact points to the wrench space (Hence, it does not really care about absolute magnitude of applied forces). However, the implementation in the Dex-net code base seems to directly use applied forces and torques to build their matrix, which makes me confused.

I'm currently trying to build a grasp matrix for 2 soft-finger gripper. I hope someone can give me a concrete explanation or reference I can look up.

Title: Grasp matrix implementation


问:
SIM808L 2.0 won't connect to Arduino
I have an Arduino Uno and a SIM808L 2.0 module.

I want to connect the module to the Arduino, but I can't. It displays 'not working' (you can see in the picture)

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

SoftwareSerial sim(10, 11);

void setup() {
  delay(7000);
  Serial.begin(9600);
  Serial.println(9600);
  sim.begin(9600);
}

void loop() {
  if (Serial.available() > 0) {
    Serial.println("working");
  } else {
    Serial.println("not working")
  }
}
</code>```

Title: SIM808L 2.0 won't connect to Arduino


问:
Convert 5-axis CNC motion to robotic arm motion
I have G-code generated for a 5 axis CNC machine, with a rotating and tilting table. I would like to run this code on my robotic arm and therefore thought about converting it to a rotating and tilting head movement. For better understanding, I will attach an image. This should be possible (right?), but I do not get the mathematics behind it. My aim is then to write a small script to convert the G-code.

Setup of desired G-code (left), setup of provided G-code (right):

Provided G-code example:

```<code>G1 X0.08 Y-19.33 Z88.81 B-9.96 C-13.14
G1 X0.26 Y-19.25 Z88.83 B-9.90 C-11.68
G1 X0.45 Y-19.19 Z88.85 B-9.84 C-10.22
G1 X0.63 Y-19.14 Z88.86 B-9.79 C-8.77
G1 X0.81 Y-19.10 Z88.88 B-9.73 C-7.31
G1 X0.91 Y-19.06 Z88.89 B-9.72 C-6.02
</code>```


问:
Bundle Adjustment and error propagation
When you do bundle adjustment do states with higher accuracy have stronger certainty during the optimization?

For example a state which was estimates right after starting will be closer to the true state than one far away where error was allowed to accumulate.

Title: Bundle Adjustment and error propagation


问:
Object racking on conveyor belt using low cost Lidar or similar non-camera options
The requirement is that movement of products right from the start to end of the conveyor belt  (of length around 2.5 m) need to be tracked. The same can be easily done using any IP Camera and OpenCV but here we can not use Camera. I could think of Lidar as an alternative option but usually the cost is too high and vertical FOV is less. Any suggestion of applicable Lidars less costing than $500?</p>


问:
Modelling line sensors for localizing a mobile robot using the Kalman Filter
My goal is to localize a mobile robot with Mecanum wheels in a 8m x 10m area, that is outlined with white lines. The robot weighs around 25 kg, and has a top speed of 2 m/s. The localization should be accurate up to 10 cm. For the processing, I am using the ESP32 MCU.

Sensors used are:

4x Hall effect sensors on each wheel

9-axis IMU (accelerometer, gyroscope, magnetometer)

2x line sensors (on each lateral sides of the robot)

I am currently using the standard Kalman Filter for initial tests of the algorithm. The implementation of Hall sensors and IMU was straight-forward, however, I am facing some challenges regarding how to implement line sensors into the filter. The idea behind the line sensors is that when triggered, they would decrease the covariance of the state estimate and translate the state estimate closer to the location of the line.

The variables in the state vector are:

x, y direction

orientation

x, y speed

angular velocity around z-axis

Does anybody have any suggestions how I could reference line sensor interrupt data, to the location of the robot? Additionally, how can I deal with the situation, where the robot is in the corner, and could detect either a horizontal or a vertical line of the area?

Thank you in advance for any suggestions you may have.


问:
Using a PROTO node as supervisor in Webots
In my Webots simulation, I would like to use a PROTO as a supervisor and therefore added a supervisor TRUE line to the proto definition. However, it does not have any effect (self.getSupervisor() still returns false, and errors if I try to use supervisor only methods). How can I make my PROTO controller to use Supervisor methods?

I am using Webots R2022b and using a Python controller inheriting from the Driver class.

See the PROTO file below :

#VRML_SIM R2022b utf8
# modele de TT02 basé sur Altino
# license: Copyright Cyberbotics Ltd. Licensed for use only with Webots.
# license url: https://cyberbotics.com/webots_assets_license
# documentation url: https://www.cyberbotics.com/doc/guide/altino
# The "ALTINO System" is a robot platform designed for education. It is a four-wheeled robot based on an Ackermann vehicle frame.

EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2022b/projects/vehicles/protos/abstract/Car.proto"
EXTERNPROTO "../protos/TT02Wheel.proto"

PROTO TT02 [
  field SFVec3f    translation     0 0 0.036               # Is `Transform.translation`.
  field SFRotation rotation        0 0 1 0                 # Is `Transform.rotation`.
  field SFString   name            "TT02"                  # Is `Solid.name`.
  field SFString   controller      "<generic>"             # Is `Robot.controller`.
  field MFString   controllerArgs  []                      # Is `Robot.controllerArgs`.
  field SFString   window          "<generic>"             # Is `Robot.window`.
  field SFBool     synchronization TRUE                    # Is `Robot.synchronization`.
  field SFColor    color           0.69 0.0 1.0            # Is `Material.diffuseColor`.
]
{
  Car {
    translation IS translation
    rotation IS rotation
    name IS name
    model "TT02"
    controller IS controller
    supervisor TRUE
    controllerArgs IS controllerArgs
    window IS window
    synchronization IS synchronization
    trackFront                     0.15
    trackRear                      0.15
    wheelbase                      0.257
    minSteeringAngle               -0.314
    maxSteeringAngle               0.314
    suspensionFrontSpringConstant  100000
    suspensionFrontDampingConstant 4000
    suspensionRearSpringConstant   100000
    suspensionRearDampingConstant  4000
    wheelsDampingConstant          5
    extensionSlot [
      Accelerometer {
        name "accelerometer"
        xAxis TRUE
        yAxis TRUE
        zAxis TRUE
      }
      Emitter {
      }
      Speaker {
        translation 0.257 0 0
        name "TT02_speaker"
      }
      [...]
    ]
    physics                 Physics { density -1 mass 2.331 }
    radarCrossSection       100
    wheelFrontRight         TT02Wheel { name "front right wheel" }
    wheelFrontLeft          TT02Wheel { name "front left wheel" }
    wheelRearRight          TT02Wheel { name "rear right wheel" }
    wheelRearLeft           TT02Wheel { name "rear left wheel" }
    type                    "4x4"
    engineType              "electric"
    engineSound             ""
    brakeCoefficient        700
    time0To100              10
    engineMaxTorque         0.0234
    engineMaxPower          32
    engineMinRPM            1
    engineMaxRPM            13800
    gearRatio               [-0.62 0.62]
    maxVelocity             36
  }
}
```

Note that I can convert the PROTO to a base node and add a supervisor TRUE field which is a working solution, but that means not using the PROTO.


问:
Can webots start without windows?
I want to use the web interface of webots (--stream) instead of using the desktop application,How do you do it?</p>

Title: Can webots start without windows?


问:
Question about Impedance control in The Modern Robotics: Mechanisms, Planning, and Control
Impedance equation In 11.7.1 section $\tau = J^T(\theta)(\hat{\Lambda}(\theta)\ddot{x}+\hat{\eta}(\theta,\dot{x}) - (M\ddot{x}+B\dot{x} + Kx))$ is actually means $\tau = J^T(\theta)(\hat{\Lambda}(\theta)\ddot{x}+\hat{\eta}(\theta,\dot{x}) + (M(\ddot{x_d} - \ddot{x} )+B(\dot{x_d} - \dot{x}) + K(x_d - x)))$?

And exponential coordinates of end effector $\mathcal{S}\theta$ is just $\mathcal{S}  \cdot \theta$?


问:
Does rosbag play with multiple bags and -s and -u parameters know not to fully load bags that don't overlap with those times?
If rosbag play were to quickly get start and end times for each bag provided for playback it could discard those that don't overlap at all, once it knows what the full time span of all the bags are (because -s is relative to the earliest time in any of the bags, and -u is relative to that)- or does it already do that?</p>


问:
MPC over a distribution of states
What are the approaches to MPC when you have a distribution over your current state along with the process model?</p>

Title: MPC over a distribution of states


问:
Multicopter MotorModel Plugin and PID Controller for UAV in ROS2
I am making an altitude and attitude controller for an unmanned aerial vehicle (UAV, drone) with Ignition Gazebo and ROS2. I use the multicopter motor model plugin to do this. I would like your help with an interesting situation I encountered:
When I give the command to go up to my model (drone) with the joystick, the model goes up and hover in the air as I expected. But all of a sudden the model falls to the ground. The model does not move upwards even if I send the ascend command. I think this situation is not caused by the controller I wrote. I would like to explain the reason for this graphically:

Above are two graphs with the same x-axis (Click on the link and you will see). In the graphic above, there are the target distance (setpoint), the location (measured) and the difference between the setpoint and the measured (error) for the model to go, and the velocity values to go to the motors produced by the altitude controller in the graphic at the bottom. When the red graph is examined, while the controller is working correctly, that is, the model with reduced error reaches the desired (setpoint) position and drops down at a time.

When the controller graphic is examined at first, it seems to work properly, because as the error decreases (blue line in the upper graph), the velocity value that will go to the produced motors decreases. so I think the source of the problem is not the controller, but the gazebo world. Is there a factor in the gazebo world that I should pay attention to? For example, type of atmosphere, air pressure etc.

Thank you for your help,
Kind regards.

I changed the pid coefficients in the attitude controller. I observed that when the coefficients are 0, that is, when the attitude controller is disabled, the model hover in the air and falls suddenly again

OwnerDisplayName: omer


问:
Using an optical mouse sensor for odometry?
I'm trying to use a mouse sensor for odometry on my robot. Most datasheets I have found use SPI or SDIO interfaces for communicating but my microcontroller would require an I2C interface. Would it be possible to bridge this, preferably by not using an IC?

Here are some links to the datasheets I have found:

ADNS-2610:

ADNS-3080:

PAW3309DH-TKSL - This one apparently uses an I2C but I could not find any datasheets or retailers so I cannot confirm it

If you know some other mouse sensors that use I2C I'd be more than happy to hear suggestions


问:
Mahony filter not converging/settling given idealized resting values
Here's my code sandbox of a quaternion mahony filter.  I've backed into this as my copy & paste attempts to port this c code to python and get yaw on an esp32 were giving erratic results and I just can't figure out what dumb thing I'm doing wrong.

I think my demo's default input says "my sensors are ideally calibrated and reliable.  We're sitting on a desk upright, not rotating somewhere plausibly in north america" and maybe "we're pointing north" but I'm not sure about that.  It simulates having received 10 frames 200ms apart.  But instead of telling me that my roll and pitch are 0 degrees and that my yaw (maybe) pointing north or some other consistent heading, I get these erratic outputs.  Setting mE to 0 settles the chart, but not in any way that seems right.

https://codesandbox.io/s/eloquent-cray-xqy0lt?file=/src/mahony.ts


问:
Ball bearings size for an RC car
I'm want to build my first RC vehicle and for a few days I'm trying to choose the size of the ball bearings for the wheels. I'm planing to use 2 per wheel. Are 5x10x4mm (inner/outer/depth) going to rotate properly for 1-2KG vehicle? I'm considering and 6x12x5mm, but that will make it a bit harder for me work with, cause everything gets bigger and harder to craft. I have never done this before. Is there some norm size for this, that is usually applying?</p>

Title: Ball bearings size for an RC car


问:
Extended Kalman Filter Robot Localization Drift
I have implemented an EKF for robot localization in the style of robot_localization using the famous C++ template kalman library.

My state vector $x$ is 15 dimensional, including position, euler angles orientation, velocity (in robot frame), euler angle velocities (in robot frame), accelerations (robot frame)

I am using Gazebo as virtual environment to simulate IMU accelerometer + gyroscope readings, wheel encoders velocities and fake GPS readings by adding noise to base_link states taken from gazebo.

Jacobians have been derived using sympy symbolic toolbox and correctly implemented for kalman library.

Process noise $R$ and measurement covariances $R_m$ have been setup to be with a non zero, small, dynamic_reconfigure-able diagonal values.

Also the initial state $x_0$ is null with very small diagonal covariance $P_0$.

However, my robot state estimate drifts away very rapidly. The estimated robot pose starts pitching up and drifting along x, becoming unstable.

My guess is that the problem relies on the acceleration measurement model function. Mine look like this, assuming zero bias:

$$ h(x) = a + R(q)^\top g $$

where

$x$ is my state vector

$a$ the robot accelerations

$R(q)$ the rotation matrix from body to world frame using estimated orientation $q$ = [roll, pitch, yaw]

$g$ is the gravity acceleration in ENU : $\begin{bmatrix} 0 & 0 & +9.8 \end{bmatrix}^\top$

My robot starts in a slightly non-flat position, thus part of gravity acceleration is sensed in the x-axis.

However, my initial estimated orientation is flat $q = [0, 0, 0]$, so my accelerometer measurement model will sense part of the gravity as an acceleration along x as long as the estimated orientation is not correct.

How can I solve this issue? I tried adding to the filter a constant accelerometer bias but didn't help.

Should I just increase initial $P_0$ for orientation?

Thanks everyone.


问:
How does marginalization work in fixed lag smoothing?
I have read in SLAM papers talk about marginaliztion. I am confused about how this process works, why you do it and how it differs from global smoothing.

In particular if you're interested in Windowed Smoothing I don't understand how marginaliztion is different than full bundle adjustment? If marginalization carries the full information from the prior states why do global bundle adjustment?


问:
Do rviz DepthCloud or Camera displays properly make use of non-zero CameraInfo P Tx/Ty values?
Probably a quick scan through the source code can solve this to see if those entries in the P array are even looked at, I'll get to it later if no-one else comes through quicker with an answer.  If it isn't doing the right thing maybe it's not hard to add the offsets once the right place in the code is found.

Also there could be an experiment where there is dynamic reconfigure control over the P array Tx and Ty entries, and see if changing them live causes the depth cloud or camera rviz display to shift at all.

The camera info P is defined here, typically used with stereo camera pairs:
http://docs.ros.org/en/noetic/api/sensor_msgs/html/msg/CameraInfo.html

The jsk CameraInfo plugin doesn't make use of Tx/y (https://github.com/jsk-ros-pkg/jsk_visualization/issues/868), it's very easy to see whether the apex of the pyramid it draws is right on top of the tf frame or shifted off it- it's not shifted off it.


问:
How can I change the dicitonary of aruco markers in aruco_ros package to the newer DICT_4x4 dictionary?
The arcuo_ros package by pal_electronics uses old dictionaries of aruco markers, the markers of these dictionaries are coded in uint64_t integer in the code file of the dictionaries dictionary.cpp (found in the package of aruco_ros), And I want to use the newer dictionary of DICT4x4 in my application. I need a way to change the dictionary used to the newer one (You can see the difference in chev.me aruco markers generator, the dictionary Original aruco is the old DICT_4x4 dictionary, and I want to use the newer DICT_4x4 you can see the difference from chev.me generator).


问:
Stepper Motor is moving when I put hand near cables?
I wired my RaspberryPi Zero 2 with stepper motor. It works fine, just when the motor is stopped and I put my hand near cables (especially MS1, MS2, MS3) (without touching anything) motor starts to vibrate and move. What could cause this?</p>


问:
Plane-plus-parallax equation
Given a stereo rig, the following equation establishes a relation between the image $\mathbf{m}$ of point $M$ in the left camera and the image $\mathbf{m}'$ of the the same point in the right camera. $H_\Pi$ is the $3\times 3$ homography matrix induced by the plane $\Pi$ and $a$,$d$, $\xi$ are respectively the distance between $M$ and $\Pi$, the distance between the origin of the coordinate system and $\Pi$, and the depth of $M$ relative to the center of the left camera:
$$
\mathbf{m}' \simeq H_\Pi\, \mathbf{m} + \left(\frac{a}{d\, \xi} \right) \mathbf{e}'.
$$
This is the so-called plane-plus-parallax representation1.

What is not clear to me is how this equations should be converted from homogeneous to cartesian coordinates.  $\mathbf{m}$, $ \mathbf{m}'$ and $\mathbf{e}'$ are all homogeneous coordinates 3-vectors. $H_\Pi$ is a $3x3$ matrix with only 8 DOFs since its scale is not defined. According to  , the sum of homogeneous coordinate vectors is not even defined.
It's clear to me that $\mathbf{x} \simeq \mathbf{y}$ translates into $\lambda \left[x_1, x_2, 1\right]^{\rm T} = \left[y_1, y_2, y_3\right]^{\rm T}, \lambda \neq 0$.
I don't see how this is extended to the sum of homogeneous vectors. Any reference to relevant literature will be highly appreciated.

1 Shashua, Amnon, and Nassir Navab. "Relative affine structure: Canonical model for 3D from 2D geometry and applications." IEEE Transactions on Pattern Analysis and Machine Intelligence 18.9 (1996)

Title: Plane-plus-parallax equation


问:
PD control with gravity compensation
Given the robot dynamics of the form
$$M(\theta)\ddot{\theta}+C(\theta, \dot{\theta})\dot{\theta}+G(\theta)=u$$
where the notations have the standard meaning ($M$ is the inertia matrix, $C$ is Coriolis-centrifugal matrix, and $G$ is the gravity). Let the desired configuration of the robot be $\theta_d$. To track this desired configuration, we apply the following control law with a gravity compensation:
$$u=-K_p(\theta-\theta_d)-K_d\dot{\theta}+G(\theta)$$
The gain matrices $K_p, K_d$ can be assumed to be diagonal with the diagonal elements being $k_p, k_d$ respectively.

Now I need to show 1. Stability, 2. Asymptotic Stability, 3. Exponential Stability. Where the definitions of the quantities of the above are as follows:
Let $V$ be a non-negative function with derivative ¤ defined along the trajectories/solution of the system.

Stability: If $V$ is locally pdf(positive definite) and $\dot{V} \leq 0$ locally, then equilibrium point $x^* = 0$ is locally stable.

Asymptotic stability: $V$ is locally pdf and locally decresant, $-\dot{V}$ locally pdf, then $x^*=0$ is locally asymptotically stable. $V$ is pdf and radially unbounded and decrescant, $-\dot{V}$ is pdf, then $x^*=0$ is globally asymptotically stable.

Exponential stability:: $x^*=0$ is exponentially stable if there exists a $V$, that satifies the following:
$$\alpha_1||x||^2 \leq V(x) \leq \alpha_2||x||^2$$
$$\dot{V}\leq -\alpha_3 ||x||^2$$

I am not sure how to proceed with the given problem. Any help/relevant resource is helpful.

Title: PD control with gravity compensation


问:
UAV simulation of obstacle avoidance in Gazebo?
I would like to simulate some 3D path planning capabilities of an UAV in Gazebo. So Firstly, I download a point cloud of an outdoor area with obstacles. I can find any in internet.Than Load the point cloud to Gazebo. After that,convert point cloud to 3D model (something like this point cloud convert). So for this purpose I can use any type of UAV available in a standard ROS packages, or e.g. some of the MRS dronesDrones.

So my question is how to show 3D path planning capabilities of an UAV: e.g. given a starting location, show how does the trajectory avoids obstacles in the 3D model?

Any help on that?


问:
UR5 Inverse Kinematics solution by Ryan Keating and Noah J Cowan
I am studying the inverse kinematics solution written by Ryan Keating and Noah J Cowan, link here:
https://tianyusongcom.files.wordpress.com/2017/12/ur5_inverse_kinematics.pdf

I have some questions on the workings in finding angle θ2 and θ3, detailed below:

I am struggling to understand the method of finding angle θ2. In the solution provided (screenshot below), θ2 is found by taking atan2 of (P_3_1_y, and -P_3_1_x). I do not understand why there is a specific need of taking the negative of P_3_1_x. Wouldn't atan2 function take care of the sign and return the 4 quadrant angle?

I have some difficulty in understanding method finding angle θ3 as well. Shouldn't cos(ξ) = -cos(θ3)?

I apologize in advance if my question is unclear. Please let me know if there's any need to clarify further my question, and thanks a lot for helping me!


问:
Marker pose flickering one axis from -4 to +18 when camera is not moving
I'm taking a sequence of frames from intel real sense and detecting april tags, I noticed the axis is flickering even camera is not moving. euler angle y axis is changing(visually and numerically) from -12 to +4 (bottom of image.)

import cv2

from realsense_class import realsense

import apriltag

import numpy as np

from rot_to_eul import rotation_angles

rs =realsense()
detector = apriltag.Detector(None, searchpath=apriltag._get_dll_path())

while True:

    frame = rs.frame()

    result, overlay = apriltag.detect_tags(frame,
                                               detector,
                                               camera_params=(602.46772263,601.47613486, 317.73338684, 238.16057326),
                                               tag_size=0.06,
                                               vizualization=2,
                                               verbose=0,
                                               annotation=True
                                              )

    #camera pose estimation

    if len(result) >0:
        pose = result[1]

        rotM = pose[:3, 0:3]
        tvec = pose[0:3,3:4]

        print("Euler_Angles",rotation_angles(rotM,'xyz'))
```


问:
Barrel with slot, that can slide

Image sourced from: Huygens optics YouTube channel : Maskless Wafer Stepper Part 2: Mechanics @ 7:40

I need to couple a stepper motor to a leadscrew that will be translating back and forth. One solution that I saw online is to have a barrel with a slot, and have a notch coming out of a disk attached to the motor shaft that rotates the barrel.

Is this a standard part? If so, what is it called?

Title: Barrel with slot, that can slide


问:
Making an automated chessboard
I want to create an automated chessboard. At the moment, I'm making the project and deciding what technology to use to detect which piece is at what position and how to move them. I'm not so skilled in eletronics so I'm reading online and trying to find an efficient and cost-friendly solution.

I read about reed switches, but these only detect if a piece is in a position, without telling which piece is it. The same goes for hall effect sensors. Then I thought about using computer vision, but placing a camera on top of everything would be bulky.

So a nice idea could be using rfid tags under every piece. Also magnets have to be placed to move the pieces and small leds to show the possible moves in the board. Magnetic field could be a problem.

I wanted to ask, if this idea could work from an eletronic aspect, and if there are other technologies to be used.

Thank you.

Title: Making an automated chessboard


问:
Simulink and Arduino - Simulink can't read data from arduino pins
I have a very simple setup depicted by this picture

All I want to do is, using simulink, collect data from pin 8. Simulink model is as follows

However I'm not getting any data, specifically 0. I can WRITE to pins but I can't read from them. I'm running it on external mode, fixed step and discrete. Help please? I want to eventually use it for system identification.


问:
Do MEMS or optical gyroscope record Earth's rotational and revolutional angular velocities?
I am using a 3 axis gyroscope (Android device) to record angular velocities using a sensor data logger application.

When the device is placed stationary, the gyroscope recorded the following values:

X: 0.003

Y:0.00042

Z:0.0045

At an instantaneous time t.

If I resolve the vector components to find angular velocity using the below formula,

(Is this formula correct btw?)

The angular velocity of the device = sqrt(0.0000009+0.0000001764+0.00002025) =0.0046 rad/sec = 0.26 deg/sec

What is the reason that the device is calculating a rotational speed of 0.26 deg/sec even when the device is stationary?

The Earth's rotation rate is only 0.0041 deg/sec.  What am I missing here? Is this a calculation mistake or is this due to the sensor noise?

I am aware that cheap sensors used in Android devices are susceptible to noise data.

What I wanted to know is:

Do gyroscopes in general (fiber optic gyroscopes and MEMS gyroscopes) record the angular velocity of the Earth's rotation around its own axis?

Do gyroscopes also record the angular velocity of the Earth's revolution around the sun?

If the angular velocity of the Earth's rotation and Earth's revolution around the sun is recorded by the gyroscope, what is the optimal method to remove it?

Update

For the final project we are using fibre optic gyro scope to measure orientation of a ground vehicle, The above experiment was only for Proof of concept using MEMS IMU.

However I understand that due to difference in sensitivities of measurement and error factors in MEMS and Fibre optic gyroscopes these devices may or may not measure earth's rotational velocity (It is possible for fibre optic gyroscope to measure earth's rotational rate i.e., earth's angular velocity)

Goal

My end goal is to design a system which records the orientation of a car in 3D space for a time period of 24 hours using a fiber optic gyroscope,

However if fiber optic gyroscopes record earth's rotational rate velocities I am here to ask for the method of compensation of these velocity from my gyroscope readings. Since rotational velocity of earth is subjected to change in each axis of gyro to give different values w.r.t orientation of device on earth, what is the optimal method to remove earth's rotational velocity from gyroscope readings any literature/Research Papers recommendation for this specific topic will be helpful I am using integration for the recorded angular velocities to find the angular displacement in each axis.


问:
hitbot Robot Z-Arm 922. Does anybody know hot to use the safety stop programmaticaly?
I'm currently programming a sequence in which the robot go and picks two plastic parts from a mold and places them y different positions in order to cut the surplus plastic from the molding process, I currently have a safety stop which stops the robot movement and a configurable input set to resume the action of the robot, but i was told that We needed to use that safety stop to stop the robot and after that return to home position and start all the process again.

My problem is that I can't find any way to actually see the state of the safety input and do a homing sequence after reestablishing the safety, I can't find either anybody who demonstrates how to do so, so I'm pretty lost.

Here is information about safety I/O of the robot and a wiring example


问:
I need help getting the DH parameters for a humanoid robotic arm with four revolute joint. Kindly ignore point Q4 in the image below

I'm new into robotics, and I've been trying to get the DH parameters of the robotic arm in the image below.


问:
MPU6050 providing gyroscope values for linear acceleration
I am using this ROS2 driver to connect my MPU6050 to RPi 4 running ROS2 humble. It outputs an IMU message containing linear acceleration and angular velocity. The linear acceleration values seem to be gyroscope values, as they change when I tilt the robot but not when the robot accelerates in X,Y or Z. But I want X and Y acceleration values for Ros2 robot_localization via ekf, how would I get that. Is that an issue with this driver, or a problem with MPU6050? Thanks I am a beginner.

Edit: I get the values described in the robot_localization wiki:

Acceleration: Be careful with acceleration data. The state estimation
nodes in robot_localization assume that an IMU that is placed in its
neutral right-side-up position on a flat surface will: Measure +9.81
9.81  meters per second squared for the Z Z  axis. If the sensor is rolled +90 90  degrees (left side up), the acceleration should be
+9.81
9.81  meters per second squared for the Y Y  axis. If the sensor is pitched +90 90  degrees (front side down), it should read -9.81
9.81  meters per second squared for the X X  axis.

But I don’t understand how this works. When I pitch the robot forward, it goes forward faster and faster in RViz. And when moving around it eventually drifts because of this. Why is linear_acceleration providing me angular values? Perhaps it is measuring the acceleration forces on the robot but this would change when the robot is pitch/rolled so how does the EKF properly control for changes in pitch and roll?


问:
Why new/recommended MEMS IMU for AHRS for drones are 6-DOF instead of 9-DOF?
I'm developing an quadcopter as an DIY project.

I'm in nascent stage of development.

I've just finalized the design/working philosophy.

I'm planning to fuse data from 9-DOF (9-Axes) IMU + GNSS + Pressure Sensor using EKF to develop AHRS-INS for my quadcopter.

I was looking into integrated (single chip) 9-DOF IMU (Accelerometer + Magnetometer + Gyroscope) MEMS Sensor IC. I was looking into Bosch Sensortec (BNO055) and TDK (ICM-20948).

TDK ICM-20948 has a status of NRND and has been marked as EOL.

While I was browsing through these IC manufacturers website I realized that most new/recommended sensor ICs for quadcopter/drones are 6-DOF (6-Axes) and not 9-DOF IMU. These modern sensors only house 3-Axes Accelerometer and 3-Axes Gyroscope but no magnetometer.

I wish to know

if my plan is obsolete whereby I'm plan to use 3-Axes Magnetometer along with help from GNSS to get heading/bearing with respect to true north or any alternate new approach is recommended

if 6-DOF IMU gives better performance/accuracy compared to 9-DOF IMU and it is recommended to use separate 3-Axes magnetometer in conjunction with 6-DOF IMU rather than a single interated 9-DOF IMU


问:
gazebo_ros_bumper outputs contact in other frame than the one specified
I want to simulate a simple force control scheme, namely:
$$ \tau = J^T F_{EE} $$
where $F_{EE}$ is the wedge from the end-effector to the environment. The base of my robot is at $(0,0,0)$ and i want to exert a $200N$ vertical force at a wall which is in $(0,-1.5,0)$  and i parallel to the x-axis. So i want to exert this force: $F_{EE} = (0,-200,0)N$.

The wall has $Kp=1e4$. The depth is $d = 0.010441677161379559+ 0.010441677161380447 = 0.0208$ so the normal force is expected to be $F_{expected} = 208N$. It would be positive if it is the force that the wall exerts of negative if its the force exerted on the wall.

(The difference of 8N is okay, because the jacobian is calculated for a the center of a cylinder of radius 0.1m. However, the point of contact isn't the center (and it is expected to change)).

In the output, the contact normal is correct. It is $\vec{n} = (0,1,0)$. However,  the wedge is different:

1st $F_x$ is greater than $F_y$, even though $F_y$ should be the normal force.

2nd Is seems the reference frame of the wedge is the end effector frame.The contact force according to the plugin is:
$$ F = [-177,-110]^T $$
The orientation of the robot is (rotated around the z axis for -2.0956 rad):
$$ R_{EE} = \begin{bmatrix}   -0.5010  &  0.8654\\
   -0.8654   & -0.5010 \end{bmatrix} $$
If i do the calculations:
$$ F = R_{EE} F = [-6.8689,208.8340]^T$$

So it shows me the wedge that is exerted by the wall on the end_effector, in the end_effector reference frame.

Edit1

I made all the relevant coefficients of friction as following: $m_{u1}=0.5,\ m_{u2}=1e-3,\ m_{u,torsional}=0$. So it cannot be that the force from the sensor is in the wall frame, as the tangential compenent should be less than half of the normal component. I also changed the <frameName>, and the output doesn't change, which means the plugin outputs the collision however it wants.

Additional Info-Codes:

I have manually created a .world file that containts the wall and the bumper sensor.:

```<code>   <link name="wall">
   ...
        <collision name="wall_collision">
   ...
       <kinematic> true </kinematic>

      <sensor type="contact" name="wall_contact_sensor">
        <update_rate>1000.0</update_rate>
        <always_on>1</always_on>
        <contact>
          <collision>wall_collision</collision>
          <topic>/base_bumper_contact</topic>
        </contact>
        <plugin name="gazebo_ros_bumper_controller" filename="libgazebo_ros_bumper.so">
          <alwaysOn>true</alwaysOn>
          <updateRate>1000.0</updateRate>
          <bumperTopicName>/wall_bumper</bumperTopicName>
          <frameName>world</frameName>
        </plugin>
      </sensor>
    </link>
</code>```

The output from rostopic echo:

```<code>total_wrench:
      force:
        x: -177.2926262652362
        y: -110.57103240097061
        z: 2.037601517980556e-12
      torque:
        x: -0.2972290880381605
        y: -0.17206522523178158
        z: -0.6868815691516548
    contact_positions:
      -
        x: 0.040172384020835034
        y: -1.5104416771613796
        z: 1.1999999999999955
      -
        x: 0.04017238402083782
        y: -1.5104416771613804
        z: 1.0999999999999954
    contact_normals:
      -
        x: 0.0
        y: 1.0
        z: 0.0
      -
        x: 0.0
        y: 1.0
        z: 0.0
    depths: [0.010441677161379559, 0.010441677161380447]
</code>```


问:
Arduino robotic arm kit
I want to buy a cheap robot arm for control it with an Arduino. Do you know of a kit that has a good value for money? I don't care about the degrees of freedom it has (4, 5 or 6), and above all I'm looking for a gripper to manipulate objects. If you know of any mobile robot, I would also be very grateful.

Thank you so much.

Title: Arduino robotic arm kit


问:
How to calculate the required torque of motor for bipedal robot
I just create a bipedal robot in SolidWorks and after I got all components, I realise that I need select the correct motor for the robot. There will be four motors equipped in the robot, two for hip and two for knee.

I am wondering what parameters I need to know and what equations I should use to calculate the torque for the hip motor and torque for the knee motor? A photo of the design is also attached here.


问:
Problem milling with CNC function of Creality CP-01 3-in-1 3D printer
I am having a lot of trouble using the Creality CP-01 3D printer in doing pretty much anything, it doesn't seem to be compatible with any other software than the one provided which is extremely limited.

I want to perform my own milling operations, (this is a 3 axis machine, with X-Y on the table and Z on the head) but the software provided (Creality Workshop) can only accept JPG inputs. The milling depth is constant for any trace, and the carved dimensions are not to scale with the drawings.

I tried using Fusion 360 with multiple post-processor options, but the CP-01 printer seems to have a different G-code format. I tried Openbuild's online G-code generator, which was the closest but very poor calibration with my machine.

Not only that, but I am unable to carve PCB boards due to the lack of Gerber support, nor am I able to mill STL files.

Please advise on what I should do. If anyone knows a milling application that supports this printer's G-code or some other fix, please let me know.


问:
Compensate tractor's (vehicle's) tilts in the GNSS-IMU based system
I have the following setup: a tractor with a dual band antenna (from ublox) installed on the vehicle's symmetry axis on the roof (h=3m), approx. 1m ahead of the center of the rear axis (which I consider to be a Pivot Point of the tractor). The antenna is connected to the C099-F9P board with the ublox ZED-F9P high precision module. Moreover, I have the RTK correction data which I feed to ZED-F9P, therefore the position is rather accurate (around 2cm accuracy).

Near the antenna, I have mounted a BNO08X IMU sensor, which is set to produce the so-called 'game rotation vector' (Euler angles: yaw, pitch, roll).

I use this sensor for two purposes:

To precisely calculate vehicles heading (ZED-F9P gives a steady in time, but rough estimates of heading, whereas BNO08X produces highly accurate heading for a certain moment, but it drifts over time). I use them in a form of a sensor fusion, which can be depicted as follows:

```<code>    IMU_angle ---------+----------+-------------------------------------------> fusion output
                       |          |                                                ^ -
                       |          |                                                |
                       |          +---> process noise ------> kalman filter -------+
                       |+                                         ^
                -      v                                          |
    GPS_angle ---> heading diff ------> measurement noise --------+
</code>```

To compensate any tilts while driving on a bumpy fields. In this case the antenna can move about +/- 15cm side to side, even when the tractor drives on a straight line in terms of navigation and map projection. This produces a problem for my application because it sees the antenna moving side to side and it 'thinks' my vehicle does a small amplitude 'sinusoidal' movements.

I've tried to address the 2nd problem in the following manner:

sample position, on average, with T_pos = 100ms (10Hz),

sample BNO08X, on average, with T_imu = 50ms (20Hz),
Since I know 'antenna vector' (vector from the physical vehicle's Pivot Point to the antenna) I can compute the true pivot point by:

rotating the antenna vector by IMU's temporary roll, pitch and yaw,

substracting from the obtained XYZ position (from the antenna) the rotated vector's components (x_antenna - x_rotated = x_true, ...)

I then pass the obtained values (x_true, y_true, z_true) to a simple 'moving average' filter in order to get rid of unwanted noise.

The problem is that even though I know I drive the vehicle on a straight line, after the compensations the XY plot shows the non-straight, sinusoidal movement. What am I doing wrong? Should I try different approach?

I have a feeling that maybe I should use some Kalman fusion algorithm (or Extended Kalman Filter?) to somehow  auto-magically compensate GPS antenna tilts with Euler angles coming form IMU - but I cannot find any whitepaper for inspiration how to implement it.

My goal is to have a situation where, despite tractor's cabin tilts aside during a forward movement, I receive straight movement trajectory


问:
Python How to fuse road segmentation data from an image to AOA data(distance, angle)

I have road segmentation data which is highlighted by the semi-transparent blue color.
It is an Numpy matrix with 0 means not road, 1 represents road.

I also have AOA data which tells the distance and angle between the camera and the Human block.

Now my question is: how can I fuse these 2 types of data together so that my DC motor car knows how it can drive to the target human via the detected road segmentation?

```<code>aoa_data = aoa.get_data()
# aoa_data : {"distance": 2.3, "angle": 37.5}
road_seg = nn.get_road_seg()
# road_seg is a matrix which contains 1 for road, 0 for non-road pixels.
</code>```

ps:
Please let me know if this is the correct place to post this topic, thanks.

OwnerDisplayName: Franva


问:
WEBOTS - Connect a external Tkinter Script to main controller?
I have a WEBOTS Simulation with an automobile. Now while WEBOTS provides a camera overlay, I want to display the result of image processing along with sensor data in a comprehensive manner.

For this I have written a simple GUI application using tkinter and customtikinter libraries in a separate script inside the same folder as the WEBOTS Controller.

When I try to call this script from the WEBOTS Controller, the app launches perfectly but my WEBOTS Simulation is paused while the app is running.

Is there any way to pass, let's say an array from my WEBOTS Controller to the GUI Script without affecting the Simulation?

Controller Code:

```<code>import cv2
import dataviz #<-- I tried to import the GUI Script here. The script launches but pauses the Webots simulation
import numpy as np
from controller import Camera, GPS, Compass
from vehicle import Driver

driver = Driver()
timestep = int(driver.getBasicTimeStep())

camera = driver.getDevice('camera')
camera.enable(timestep)
gps = driver.getDevice('gps')
gps.enable(timestep)
compass = driver.getDevice('compass')

def image_processing():
    data = camera.getImage()
    img = np.frombuffer(data, dtype=np.uint8).reshape((camera.getHeight(), camera.getWidth(), 4))

    gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
    # dataviz.called(img) # I also tried to create a function in the GUI script to pass the img array but it had the same results.
    cv2.imshow("Video Feed", gray)
    cv2.waitKey(timestep)

def get_gps_data():
    gps_xyz = gps.getValues()
    print(gps_xyz[0],gps_xyz[1])
    print('Speed', gps.getSpeed())
    print('Speed Vector', gps.getSpeedVector())

# Main control loop
while driver.step() != -1:
    driver.setCruisingSpeed(30)
    image_processing()
    get_gps_data()
</code>```

GUI Code:

```<code>import tkinter as tk
import customtkinter as CTK
from PIL import Image, ImageTk

import numpy as np
import cv2

CTK.set_appearance_mode("System")  # Modes: "System" (standard), "Dark", "Light"
CTK.set_default_color_theme("blue")  # Themes: "blue" (standard), "green", "dark-blue"

class App(CTK.CTk):
    def __init__(self):
        super().__init__()

        gray = np.ones(1,1) #<-- This is a dummy array. I want the image captured by the camera to be passed here.
        # gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) #This was just to test if the code worked standalone.
        height, width = np.shape(gray)
        im = Image.fromarray(gray)
        ph = CTK.CTkImage(im, size=(width,height))

        # configure window
        self.title("CustomTkinter complex_example.py")
        self.geometry(f"{1100}x{580}")

        self.grid_rowconfigure(0, weight=1)
        self.grid_columnconfigure(0, weight=1)

        self.bottombar_frame = CTK.CTkFrame(self, height= 10, corner_radius=0, fg_color="green")
        self.bottombar_frame.grid(row=1, column=0, rowspan=4, sticky="nsew")
        self.bottom_label = CTK.CTkLabel(self.bottombar_frame, text = "Data Visualiser")
        self.bottom_label.grid(row=0, column=0, columnspan=2, padx=5, pady=5, sticky="nsew")

        # create tabview
        self.tabview = CTK.CTkTabview(self)
        self.tabview.grid(row=0, column=0, padx=5, pady=5, sticky="nsew")
        self.tabview.add("Tab 1")
        self.tabview.add("Tab 2")
        self.tabview.add("Tab 3")
        self.tabview._segmented_button.grid(sticky="W")

        self.label_tab_2 = CTK.CTkLabel(self.tabview.tab("Tab 2"), image=ph, text="")
        self.label_tab_2.grid(row=0, column=0, padx=20, pady=20)

app = App()
app.mainloop()

#def called(image):  # I thought keeping the GUI loop inside a callable function might solve the problem but it did not.
    #app = App()
    #app.mainloop()
    #return 0

<span class="math-container">```
```


问:
How to disable python relay package creation by catkin
As explained by this doc, catkin_python_setup() in the CMakeLists looks for the setup.py for a Python package, and also generates a "relay package":

This creates relays for all scripts listed in scripts to a folder in devel space where they can be found and executed, and also relay packages for any package listed in packages. A relay package is a folder with an __init__.py folder and nothing else. Importing this folder in python will execute the contents of __init__.py, which will in turn import the original python modules in the folder in the sourcespace using the python exec() function.

This is a hacky way of having it so that in the devel space, importing your ROS python package imports the package as is defined in the src/ rather than the built install space one. But the hackiness of the relay package seems to destroy the everyone's IDE's analysis software.

Is there a way of disabling the relay package generation? I tried to parse the .cmake source for the function but it relies on a ${PROJECT_NAME}_SETUP_PY_MODULES to decide whether to do it, which is set through some python scripts called through cmake I think? there's a lot of indirection and it's hard to keep track of


问:
Build ROS 2 messages with Python 3.7
I'm required to build some ROS 2 custom messages using Python 3.7.
They're meant to be used with a library only available for 3.7, so the only way of importing these messages is if they're built for the same version.

I do know Eloquent builds with 3.6 and Foxy with 3.8, so I might need to install from source, but I'm not finding a way of forcing the dependencies to be installed, and therefore ROS 2 built, with 3.7.

If I start from Ubuntu 19.04 (that allows 3.7), there are missing dependencies as some packages cannot be found, I think it's mainly a problem of not being an LTS version. Even if I find a workaround, I always end up with Python 3.8 installed. The same happens if I start over from Ubuntu 20.04.

What's my best bet to solve this? Is there any other nicer solution?

Title: Build ROS 2 messages with Python 3.7


问:
How does IMU pre-integration work and how is it different from EKF?
My understanding is that IMU pre-integration is to get away from having to re-integrate the the IMU between key-frame intervals when doing bundle adjustment. The formulations I ave seen involve a complicated computation involving SO(3) manifold. I'm curious, why not just propagate the IMU state change by linearizing the function as in EKF? At the end of the sequence you should still get an expected state offset which is gaussian distributed according to a particular covariance matrix(assuming additive gaussian noise). Why involve this additional Lie-Group theory?</p>


问:
Can the human body distribution of load and effort on the lower body be directly translated to bipedal robots?
So, I couldn't find the actual source for this affirmation, but I read somewhere some time ago that the lower part of the human body has to be 3 times stronger than the top half; and that's why you can carry weight on your arms and still be able to walk, run and jump. If not, you would just "jam" in place, like the way it happens to people on the gym.

To me this was pretty sound, but thinking on the translation of this logic to a bipedal humanoid robot makes me ask:

If one were to follow this same logic, and the top half of the bipedal humanoid robot was able to lift 100kg, would each single electric motor on the lower part of the body need to use 300kg of torque? Or should the 300kg torque be distributed to each motor?

Of course, I know it is kinda hard to answer without a precise model to compare to, but just assume that there are 3 motors on the hips for 3 degrees of freedom, one on the knee and one on the feet. So, 10 electric motors in total.


问:
RVIZ Transform error
I am working on a custom spherical robot with two motors which controls the two pendulum and one motor which drives the robot.

When RViz is launched: The Global option > Fixed frame is set to base_link and shows all the transforms except the following mentioned links.

An error appears for the pendulum link and hull link with message saying:

```<code>No transform from [pend2_link] to [base_link]
</code>```

Please tell me why some transformations are showing properly and some are not.

What I have tried: I have the .urdf file of the robot, so I tried changing the joint origin values in URDF.

Title: RVIZ Transform error


问:
Not able to see topics locally but remotely, Failed port initiation
I'm a currently facing an issue, my setup is the following :

A Raspberry Pi with ROS Foxy running on the same network as a Nvidia Jetson Xavier with ROS Foxy.

My issue comes from the Xavier, I have here a docker running and getting data from a LIDAR.
However when I run ros2 topic list on the Xavier, I get the following errors:

```<code>2023-04-04 15:24:38.141 [RTPS_TRANSPORT_SHM Error] Failed init_port fastrtps_port20162: open_and_lock_file failed -> Function open_port_internal
2023-04-04 15:24:38.146 [RTPS_TRANSPORT_SHM Error] Failed init_port fastrtps_port20163: open_and_lock_file failed -> Function open_port_internal
</code>```

I cannot see the topics even if I can see the topics created by the Raspberry Pi.
Also if I run ros2 topic list on Raspberry Pi, it can see all the topics created inside the docker.

I guess the issue is linked to these ports but I have no idea how to fix it.


问:
Kinematic model of skid-steering mobile robot (4 wheeled mobile robot)
The kinematic model for skid-steering mobile robot (4 wheeled mobile robot) is

where state vector is $q = (x,y,\theta)$, and $\eta = (v,w)$ is the linear and angular velocity of the robot, and $x_{ICR}$ is the x-coordinate of ICR in local frame $oxy$. If this model is right thern:

In which cases, $x_{ICR}$ has a value (and how it can be calculated?) and in which has no value? What if the center of mass CoM is located at the geometric center of the robot and what if not?

Actually I have looked to the follwoing question but there were no answers to my questions.
In Kinematics of a 4 wheeled differential drive robots


问:
What's easiest way to work out Link Twist?

When I try working out link length, I get opposite signage. Is it most effective to draw $z^0$ on Frame 1 and twist $x^1$ to get $z^0$ to be parallel to $z^1$?

I think I was trying to get $z^1$ parallel to $z^0$ by rotating about $x^1$.


问:
How to get ultra smooth BLDC velocity control (Netflix robotic project)
We've been working on this for quite some time, let me share what we have tried:

Multiple motors (skewed magnet, 24 pole, in-runner, outrunner)

Multiple encoders (14-bit optical, 40K CPR optical, 19-bit magnetic RLS)

Multiple motor drives (odrive, mjbots)

Tuned control https://docs.odriverobotics.com/v/latest/control.html

Anti cogging algorithms

Our issue is that no matter what we do, we can't get velocity smoothness < 0.1 rev/s. Especially at speeds 5RPS +, at low speeds velocity is quite smooth with high-resolution encoders.

Our application requires ultra-smooth controls for automatic camera operations.

Any idea why we can't get smoothness < 0.1 RPS ??

Here is what our velocity looks like:


问:
What is a good valve that can automatically open/close wet food particles?
Something that is 2-4 inches wide. Different types of valves like pinch, iris, butterfly, etc. Or something else?</p>


问:
Understanding ROS 2 publisher size, subscriber size, and topic size
I have the following ROS 2 scripts for a publisher and subscriber:

```<code>import rclpy
from rclpy.node import Node
from std_msgs.msg import String
import time

class MinimalPublisher(Node):
    def __init__(self):
        super().__init__('minimal_publisher')
        self.publisher_ = self.create_publisher(String, 'topic', 1)

        self.timer1 = self.create_timer(1, self.timer1_callback)
        self.timer2 = self.create_timer(2, self.timer2_callback)
        self.timer3 = self.create_timer(3, self.timer3_callback)
        self.i = 1
        self.j = 1
        self.k = 1

    def timer3_callback(self):
        msg = String()
        msg.data = 'timer3:  %d' % self.k
        self.publisher_.publish(msg)
        self.get_logger().info('Publishing: "%s"' % msg.data)
        self.k += 1

    def timer2_callback(self):
        msg = String()
        msg.data = 'timer2: %d' % self.j
        self.publisher_.publish(msg)
        self.get_logger().info('Publishing: "%s"' % msg.data)
        self.j += 1

    def timer1_callback(self):
        msg = String()
        msg.data = 'timer1: %d' % self.i
        self.publisher_.publish(msg)
        self.get_logger().info('Publishing: "%s"' % msg.data)
        self.i += 1
        # self.create_rate(4).sleep()

def main(args=None):
    rclpy.init(args=args)
    minimal_publisher = MinimalPublisher()

    time.sleep(2)

    msg = String()
    msg.data = 'Publishing garbage 1'
    minimal_publisher.publisher_.publish(msg)
    msg = String()
    msg.data = 'Publishing garbage 2'
    minimal_publisher.publisher_.publish(msg)
    msg = String()
    msg.data = 'Publishing garbage 3'
    minimal_publisher.publisher_.publish(msg)
    msg = String()
    msg.data = 'Publishing garbage 4'
    minimal_publisher.publisher_.publish(msg)
    msg = String()
    msg.data = 'Publishing garbage 5'
    minimal_publisher.publisher_.publish(msg)
    msg = String()
    msg.data = 'Publishing garbage 6'
    minimal_publisher.publisher_.publish(msg)

    time.sleep(3)
    # rate = minimal_publisher.create_rate(5)
    # rate.sleep()

    try:
        rclpy.spin(minimal_publisher)
    except KeyboardInterrupt:
        pass

    # minimal_publisher.destroy_node()
    # rclpy.shutdown()

if __name__ == '__main__':
    main()
</code>```

I used timer to hold after publishing some garbage messages, and then started spinning using 3 timers. I have a simple subscriber node as follows:

```<code>import rclpy
from rclpy.node import Node
from std_msgs.msg import String
import time

class MinimalSubscriber(Node):
    def __init__(self):
        super().__init__('minimal_subscriber')
        self.subscription = self.create_subscription(String,'topic',self.listener_callback, 4)
        self.subscription  # prevent unused variable warning

    def listener_callback(self, msg):
        self.get_logger().info('I heard: "%s"' % msg.data)

def main(args=None):
    rclpy.init(args=args)
    minimal_subscriber = MinimalSubscriber()
    # delay = minimal_subscriber.create_rate(2.5)
    rclpy.spin(minimal_subscriber)

if __name__ == '__main__':
    main()
</code>```

I used a launch file to run both publisher and subscriber at once. I did some experiments by varying the publisher and subscriber queue size in the above code in order to understand topic size, publisher queue, subscriber queue as follows:

Experiment 1: pub queue size 1, sub queue size 1.
Results: Only the 6th garbage message is shown. After that every message is received from all 3 timers (5 garbage messages lost)

Experiment 2: pub queue size 100, sub queue size 1.
Results: EXACTLY SAME AS EXPERIMENT 1 (also checked for pub size 10, 5, 6 and results are same)

Experiment 3:
pub queue size 1, sub queue size 100.
Results: All 6 garbage messages are shown (nothing lost). After that every message is received from all 3 timers.

Experiment 4:
pub queue size 1, sub queue size 4.
Results: Last 4 garbage messages are shown (First two messages are lost!). After that every message is received from all 3 timers.

It seems like only the subscriber queue size is the one that matters. The publisher size does not matter at all. Can anybody explain? Moreover, does the topic has any internal size, or only the publisher and subscriber sizes are the one that exists. I am not been able to generate any case where increasing the publisher size when the subscriber size is fixed (say 1) is making any difference!

Note: by publisher size I mean the 3rd parameter in create_publisher(), and by subscriber size I mean the 4th parameter in create_subscription()


问:
what is the best workflow to plot rosbag data in a latex format?
I want to know what could be the best workflow to get data from a rosbag to a plot in a latex format?

Is anyone familiar with tools for that?


问:
How does NDT work with global bundle adjustment?
I was reading about pointcloud matching and SLAM.

NDT is one approach to scan matching, what I am confused on is how you do global bundle adjustment using NDT occupancy grid.

https://www.researchgate.net/publication/4045903_The_Normal_Distributions_Transform_A_New_Approach_to_Laser_Scan_Matching

The thing which is confusing is basically your NDT is with respect to the global coordinates and doesn't appear to be relative to each scan.


问:
Where do I find detailed information about the building of programs using boost etc. with the intention of configuring my own API 'protocols'?
I'm brand new to programming in c++ and I'm exploring all the deepest interesting parts on my own, I'm very interested in learning about API programming and how to configure different applications cross programming (between android and windows for example) but I've only found older videos on this subject, I don't mind spending my time digging through online library's to get some PDF's (probably what I'm going to do anyway) that have what I need. But I just wanted to know if anyone else has anything related to this topic. I would really appreciate it.</p>


问:
On Gazebo Sim "gz-garden" install, how to correct ros_gz Compile Errors for ros_gz_project_template "diff_drive example
"How to install ros_gz Garden from Source" on a Ubuntu 22.04 arm64/aarch64 Jammy/ROS 2 Humble machine that has a working "gz-garden".

April 25, 2023. I'm discontinuing this work to get Gazebo Sim gz-garden & ros_gz working together, and restarting with a clean ROS2 Humble Desktop (with included Fortress Simulation), installing from Binary an Ignition Fortress and ros_gz, (which I have just completed which works) and then a new compile of the ros_gz_project_template over the Ignition Gazebo.

April 15, 2023
I followed this advice to install ros_gz from source:

On my Ubuntu 22.04/ROS 2 Desktop Full (Machine is MAC M1 Virtual Machine arm64/aarch64), removed ros-ign-* from the Desktop Full Install and my previous Binary installed sudo apt install ros-humble-gz-garden . Previously installed gz-garden as described here: https://staging.gazebosim.org/docs/garden/install_ubuntu .

This works: Run $ gz sim shapes.sdf .

So I attempted a source install from https://github.com/gazebosim/ros_gz into ~: ws/ workspace
Set the GZ_VERSION environment variable to the Gazebo version you'd like to compile against. For example:

export GZ_VERSION=garden
To enable the $ rosdep command to successfully complete, I followed "Known Issue of Command Line Tools, https://github.com/gazebosim/gz-transport.

I configured the environment variable GZ_CONFIG_PATH=/home/ubuntu/.gz/tools/config/ directory that contains links to the known location of python gz-sim7, gz-math7 and transport12. This directory contains gz and libgz-transport12.so.12.1.0 folders containing links created by the link commands:
$ ln -s /usr/lib/python3/dist-packages/gz/math7.cpython-310-aarch64-linux-gnu.so,
$ ln -s /usr/lib/python3/dist-packages/gz/sim7.cpython-310-aarch64-linux-gnu.so, and
$ ln -s /usr/lib/aarch64-linux-gnu/libgz-transport12.so.12.1.0

#Setup Workspace ~:$ /ws

git clone https://github.com/gazebosim/ros_gz.git -b humble

NOTE: I changed the ROS2 branch to humble.

~: ws $ rosdep install -r --from-paths src -i -y --rosdistro humble

~/ws$ rosdep install -r --from-paths src -i -y --rosdistro humble
-: $ #All required rosdeps installed successfully

/ws
colcon build

Compile Error results::

ros_gz_sim, ros_ign_gazebo, ros_ign_sim,  ros_gz_interfaces finished, while the next os_gz_bridge continued for 5 mins then exited code 2 with several 100 error messages.

1 Package failed: ros_gz_bridge
1 package had stderr output: ros_gz_bridge
7 packages not processed.

Suggested next steps?


问:
Understanding Mobility, steerability and manoeuvrability
Determine the degrees of mobility, steerability and
manoeuvrability for each of the following:
i. tricycle;
ii. dynamically balanced robot with a single spherical
wheel;
iii. a differential drive robot / Segway.

I see M= 2, m=1 and s=1 for tricycle but don't understand why. Others not sure


问:
Alternatives to Primesense depth cameras?
I'm looking for low-cost depth cameras (less than 1000 USD) with a range of more than 3 meters.

Currently, I have found only SoftKinetic DS-311 that meets these requirements.

Here are some other low-cost cameras that I found, but they have a short range:

pmd[vision] camboard nano

SoftKinetic DS-325

and others with a long range but high cost

Panasonic D-Imager

pmd[vision] CamCube 3.0

SwissRanger SR4500

Odos Imaging Real.iZ-1K

ContentLicense: CC BY-SA 3.0


问:
Calculate extrinsic matrix in an eye in hand configuration
I have a RGB-D camera mounted in the end effector frame of a robotic arm. I know the intrinsic matrix, but I am a little bot confused in how to calculate extrinsic matrix. Is there any packages to do it? Or how should I do?</p>


问:
Safe to stall stepper motor when driver has current limit?
So I am making a system where a stepper motor is powering a linear actuator. I am looking to buy a suitable stepper motor driver. I would like to start the linear actuator calibrated from a "zero" position. To calibrate I want to drive the actuator to max extension and from there count forward/backward steps to know actuator position. To know when the motor hits the max obstacle I could:

Use driver with stall detection: Drive until stall is detected. That's "zero"

Or drive actuators for a sufficiently long time into the wall so I know it's at max. But relying on current limiting of driver to keep safe current level while motor is stalling at max extension.

Question: Is is bad to keep a stepper motor stalled for 1 minute even though I have a current limiting stepper motor driver,  like this one, that is set to a current safe for motor


问:
What type of methodology can I use to prove my concept in a journal other than real or simulative implementation?
As I am willing to write a paper based on human-robot interaction where I am willing to suggest some ways to improve robot teleoperation in robotic competition scenarios. I have plans to go through some YouTube videos of some competitions and find out where the teleoperators are facing problems and ways to improve those. But the problem is, I can't implement those rather in real or in simulation (due to lack of resources). In that case, how should I be able to prove my suggestions so that they can be shown as a better way of operating robots?</p>


问:
Transformation matrix between base and end effector in Staubli
I have a Staubli TX2-140. I want to know if the controller gives the transformation matrix between base link and end effector in the actual robot arm configuration or if I have to calculate it. I understand that Staubli software (Staubli Robotics softare) should give it.</p>


问:
Set randomSeed to Webots World for correct reproducibility
I'm trying to set the seed value for random number generator and as mentioned in the documentation that value must be set in the randomSeed field from the WorldInfo Node.

I know that using the Supevisor I can change the field values in any Node during runtime. Can this be done?
Or which is the correct way to set that value?

In Python I'm currently using this line of code to set a seed value.
self.__robot.getFromDef('World').getField('randomSeed').setSFInt32(0 if seed is None else seed)


问:
Error RVIZ extrapolation into the future on the same machine
I get the following error when trying to view my RPLidar A2 scan in rviz2. It’s on a differential drive robot controlled using Odrive and ros2 control using Articulated Robotics. I am running everything on a laptop, no separate machines, on ROS2 humble. (BTW when I run the lidar and odrive on RPI the error get more often).

It shows perfectly fine when viewing the base_link frame, but with Odom the issue occurs.

The error:

```<code>[rviz2-4] [ERROR] [1681401743.264000589] [rviz2]: Lookup would require extrapolation into the future. Requested time 1681401743.323050 but the latest data is at time 1681401743.259460, when looking up transform from frame [laser_frame] to frame [map]
</code>```

I changed the RPlidar pkg according this link, Lookup would require extrapolation into the future on the same machine. It works intermittently but it often loses transform (I often get the error).


问:
Smooth a timestamped series of translation and quaternion samples
I have a rosbag of transforms (of type TransformStamped) I'd like to smooth a small amount without altering the overall trajectory much, just reduce the higher frequency noise.  Each consists of a translation xyz and rotation quaternion, but it's easy to convert to rotation matrix if that's more convenient- ideally I'd pass in the whole sequence to a function with some parameters and get the smoothed sequence returned.  The raw data is in ROS but the solution doesn't have to use ros datatypes.

I could resample the sequence to have exact intervals if that helps, they are around 10Hz but I could use the tf lookup interpolation to make it 10 Hz precisely.  Everything is already in a fixed reference frame.

Something in python would be preferred over C++, maybe there is a simple 6dof moving average function in numpy/scipy I could start with?

Decoupling the rotation from translation could be fine, the smoothing of the translation would be trivial and then I'd just need a way to smooth a sequence of quaternions.


问:
How to avoid Cusps and Corners when generating spline?
Here I wrote Qubic spline trajectory generation. The following are the result.

Spline that generated

Curvature of the spline

Yaw angle changes

According to Figure 02, there is a sharp change in yaw angle, i.e., between 40 to 45 alone x-axis and the corresponding location of the trajectory is shown in blue in Figure 01.

Question:

Is there a way to overcome such student changes when generating spline?


问:
Robust Communication Network in Swarm Robotics
I'm looking into best practices to build robust wireless communication networks for a swarm of ground based mobile robots. In particular the mobile robots have cellular connectivity, but some areas may have better signal, so a smart navigation strategy is needed to coordinate the swarm to send some robots to the area of greater coverage and relay the signal wireless to other robots.

What navigation strategies do you suggest? If you can share an open source reference implementation it would be great.


问:
Robot exploration algorithm
This might be a more theoretical question than a practical one, but I couldn't find a more fitting Stack Exchange (if you know of one, please point me in the right direction?).

I have control of a rover-like robot that has a single front facing camera. The rover itself will be placed in a room (which my team and I won't be able to see) and we will only be able to see through the robot's camera. On the floor of the room are a series of fiducials that the robot needs to find within a limited time period.

What navigation strategy should I apply to find the highest number of fiducials possible?

NOTE: The camera isn't a live feed, it takes a single photo on command.

Title: Robot exploration algorithm


问:
Why are moving objects and actors, that have been added to the Gazebo environment, not being detected by Sick LMS Scanner on ClearPath Husky?
I am using ROS Noetic and Gazebo.

https://github.com/JiangweiNEU/actor_collisions is used as the world, but the human walking actor is not being detected by the Husky laser scanner despite HUSKY_LMS1XX_ENABLED=1.

I am trying to use https://github.com/kangbeenlee/rrtx_global_planner/tree/main/src as the global planner in the move_base.

Request help with additions to code and commands to be run.


问:
Constraint Jacobian vs Space Jacobian
In the context of the book "Modern Robotics" of Kevin Lynch, and in the context of closed-chain mechanisms, what's the difference between the constraint Jacobian and the space Jacobian?</p>

Title: Constraint Jacobian vs Space Jacobian


问:
ROS Transformation between two Coordinate Systems
I have a robot manipulator arm and a tracepen (3D tracked device).
I can get data from the tracepen using tracepenPose, which gives me a PoseStamped() object (let us call this frame tracepen_raw).
This frame is not aligned with the world frame, rather shifted and rotated arbitrarily.

So my goal is to find a calibration which aligns the tracepen_raw frame with the world frame.

For this I want to have a Calibration() function.
It should do the following:

On the manipulator, there is a calibration socket. Its position is known as tracepen_ok

```<code>rosrun tf tf_echo world tracepen_ok
At time 1683566330.781
- Translation: [0.999, 0.568, 0.198]
- Rotation: in Quaternion [0.006, 0.010, -0.004, 1.000]
            in RPY (radian) [0.012, 0.020, -0.007]
            in RPY (degree) [0.705, 1.135, -0.422]
</code>```

The tracepen can be plugged into this socket.

Say I found the correct Calibration, then as long as the tracepen is in the socket, using Calibration(tracepen_raw) should give me tracepen_ok.

Or with other words, in rviz, the tf of tracepen_calibrated should be the same as tracepen_raw, while the tracepen is plugged.

For this I came up with the following function:

```<code>  def calculate_calibration_matrix(self):
    input("Plug in Tracepen and press Enter")
    # get the tracepen_raw pose while plugged into the calibration socket
    raw_ok_pose = PoseStamped()
    raw_ok_pose = self.tracepenPose()

    # calculate a tf from world to tracepen_raw_plugged
    tf_tracepen_raw_plugged = TransformStamped()
    tf_tracepen_raw_plugged.header.stamp = rospy.Time.now()
    tf_tracepen_raw_plugged.header.frame_id = "world"
    tf_tracepen_raw_plugged.child_frame_id = "tracepen_raw_plugged"
    tf_tracepen_raw_plugged.transform.translation = raw_ok_pose.pose.position
    tf_tracepen_raw_plugged.transform.rotation = raw_ok_pose.pose.orientation

    # broadcaste the tf so we can lookup the transform later
    self.tf_broadcaster.sendTransform(tf_tracepen_raw_plugged)
    rospy.sleep(.2)

    # now get the transform we care about: the one from tracepen_ok to tracepen_raw_plugged.
    # Applying it to raw data should give us calibrated data.
    calibration_tf = self.tf_buffer.lookup_transform("tracepen_ok", "tracepen_raw_plugged",  rospy.Time())

    # now calculate a calibration matrix from the tf
    self.calibrationMatrix = self.matrix_from_tf(calibration_tf)
    print(self.calibrationMatrix)
</code>```

This should give me a homogeneous transformation which I can apply to a Pose Object to transform it into the world frame.

Therefore in the main loop:

```<code>  def run(self):
      rate = rospy.Rate(10)

      while not rospy.is_shutdown():

          # Get data from OpenVr
          tracepenPose = self.tracepenPose()

          # Get the tracepen_raw_tf and broadcast it
          tracepen_raw_tf = self.calculate_tf("tracepen_raw", tracepenPose)
          self.tf_broadcaster.sendTransform(tracepen_raw_tf)

          # Now convert the tracepen_raw_tf to a matrix, apply the calibration matrix...
          tracepen_calibrated_matrixnotation = self.calibrationMatrix @ self.matrix_from_tf(tracepen_raw_tf)

          # ... and convert it back to a tf
          tracepen_calibrated_tf = self.tf_from_matrix(tracepen_calibrated_matrixnotation, "world", "tracepen_calibrated")

          # Braodcast the calibrated tf.
          self.tf_broadcaster.sendTransform(tracepen_calibrated_tf)

          rate.sleep()
</code>```

Except this does not do what it is supposed to do. Even in the plugged position, where actually tracepen_ok should coincide with tracepen_calibrated, it does not:

The full code is:

```<code>#!/usr/bin/env python3

import rospy
from geometry_msgs.msg import PoseStamped, TransformStamped, Pose
from std_msgs.msg import Bool, String
import tf2_ros
import tf

import numpy as np
import transforms3d
from transforms import Transforms3DUtils
from ur_msgs.msg import IOStates

#tracepen dependencies
import triad_openvr as triad_openvr
import time
import sys

import tf.transformations

class TracepenNode(object):
  def __init__(self):

    try:
      self.v = triad_openvr.triad_openvr()
    except Exception as ex:
      if (type(ex).__name__ == 'OpenVRError' and ex.args[0] == 'VRInitError_Init_HmdNotFoundPresenceFailed (error number 126)'):
        print('Cannot find the Tracepen.')
        print('Is SteamVR running?')
        print('Is the Tracepen turned on, connected, and paired with SteamVR?')
        print('Are the Lighthouse Base Stations powered and in view of the tracepen?\n\n')
      else:
          rospy.logerr(f"An exception of type {type(ex).__name__} occurred. Arguments:\n{ex.args}")
      quit()

    if len(sys.argv) == 1:
      interval = 1/250
    elif len(sys.argv) == 2:
      interval = 1/float(sys.argv[1])
    else:
      print("Invalid number of arguments")
      interval = False

    self.rpy = PoseStamped()
    self.calibPose = PoseStamped()
    self.rawPose = PoseStamped()

    rospy.loginfo('fmp_tracepen_node: initialized')

    self.tf_broadcaster = tf2_ros.TransformBroadcaster()
    self.tf_buffer = tf2_ros.Buffer()
    self.tf_listener = tf2_ros.TransformListener(self.tf_buffer)
    self.tf_broadcaster = tf2_ros.TransformBroadcaster()

    print(self.waitForTracepen())
    self.calculate_calibration_matrix()

  def waitForTracepen(self):
    """ Waits for the tracepen to be connected to the system

    """
    tracepenPose = None
    while tracepenPose is None or (tracepenPose.pose.position.x == 0 and tracepenPose.pose.position.y == 0 and tracepenPose.pose.position.z == 0):
          tracepenPose = self.tracepenPose()
          rospy.sleep(0.1)
    return tracepenPose

  def tracepenPose(self):
    """ Get the data from the VR tracker through the steamVR

    rparam position: The position of the tracepen already fixed in the x, y and z directions
    rtype position: geometry_msgs.PoseStamped()
    """
    tracepenpose = self.v.devices["controller_1"].getPoseQuaternion()
    position = PoseStamped()

    try:
      position.pose.position.x = tracepenpose[0] #2
      position.pose.position.y = tracepenpose[1] #0
      position.pose.position.z = tracepenpose[2] #1
      position.pose.orientation.x = tracepenpose[4]
      position.pose.orientation.y = tracepenpose[5]
      position.pose.orientation.z = tracepenpose[6]
      position.pose.orientation.w = tracepenpose[3]
    except:
      rospy.logerr("fmp_tracepen_node: Data not received")

    return position

  def calculate_tf(self, frameName, pose):
    """
    Calculates a transformation from the "world" frame to a specified child frame,
    based on a given PoseStamped message.

    Args:
        frameName (str): The name of the child frame for the transformation.
        pose (PoseStamped): A PoseStamped message representing the pose of the child
            frame relative to the "world" frame.

    Returns:
        TransformStamped: A TransformStamped message representing the transformation
            from the "world" frame to the child frame.
    """
    transformation = TransformStamped()
    transformation.header.stamp = rospy.Time.now()
    transformation.header.frame_id = "world"
    transformation.child_frame_id = frameName
    transformation.transform.translation = pose.pose.position
    transformation.transform.rotation = pose.pose.orientation
    return transformation

  def calculate_calibration_matrix(self):
    input("Plug in Tracepen and press Enter")
    # get the tracepen_raw pose while plugged into the calibration socket
    raw_ok_pose = PoseStamped()
    raw_ok_pose = self.tracepenPose()

    # calculate a tf from world to tracepen_raw_plugged
    tf_tracepen_raw_plugged = TransformStamped()
    tf_tracepen_raw_plugged.header.stamp = rospy.Time.now()
    tf_tracepen_raw_plugged.header.frame_id = "world"
    tf_tracepen_raw_plugged.child_frame_id = "tracepen_raw_plugged"
    tf_tracepen_raw_plugged.transform.translation = raw_ok_pose.pose.position
    tf_tracepen_raw_plugged.transform.rotation = raw_ok_pose.pose.orientation

    # broadcaste the tf so we can lookup the transform later
    self.tf_broadcaster.sendTransform(tf_tracepen_raw_plugged)
    rospy.sleep(.2)

    # now get the transform we care about: the one from tracepen_ok to tracepen_raw_plugged.
    # Applying it to raw data should give us calibrated data.
    calibration_tf = self.tf_buffer.lookup_transform("tracepen_ok", "tracepen_raw_plugged",  rospy.Time())

    # now calculate a calibration matrix from the tf
    self.calibrationMatrix = self.matrix_from_tf(calibration_tf)
    print(self.calibrationMatrix)

  def matrix_from_tf(self, tf_stamped):
    translation = [tf_stamped.transform.translation.x, tf_stamped.transform.translation.y, tf_stamped.transform.translation.z]
    rotation = [tf_stamped.transform.rotation.x, tf_stamped.transform.rotation.y, tf_stamped.transform.rotation.z, tf_stamped.transform.rotation.w]
    tf_matrix = tf.transformations.translation_matrix(translation)
    tf_matrix = tf.transformations.quaternion_matrix(rotation) @ tf_matrix
    return tf_matrix

  def tf_from_matrix(self, matrix, parent_frame, child_frame):
      translation = tf.transformations.translation_from_matrix(matrix)
      rotation = tf.transformations.quaternion_from_matrix(matrix)
      tf_stamped = TransformStamped()
      tf_stamped.header.stamp = rospy.Time.now()
      tf_stamped.header.frame_id = parent_frame
      tf_stamped.child_frame_id = child_frame
      tf_stamped.transform.translation.x = translation[0]
      tf_stamped.transform.translation.y = translation[1]
      tf_stamped.transform.translation.z = translation[2]
      tf_stamped.transform.rotation.x = rotation[0]
      tf_stamped.transform.rotation.y = rotation[1]
      tf_stamped.transform.rotation.z = rotation[2]
      tf_stamped.transform.rotation.w = rotation[3]
      return tf_stamped

  def run(self):
      rate = rospy.Rate(10)

      while not rospy.is_shutdown():

          # Get data from OpenVr
          tracepenPose = self.tracepenPose()

          # Get the tracepen_raw_tf and broadcast it
          tracepen_raw_tf = self.calculate_tf("tracepen_raw", tracepenPose)
          self.tf_broadcaster.sendTransform(tracepen_raw_tf)

          # Now convert the tracepen_raw_tf to a matrix, apply the calibration matrix...
          tracepen_calibrated_matrixnotation = self.calibrationMatrix @ self.matrix_from_tf(tracepen_raw_tf)

          # ... and convert it back to a tf
          tracepen_calibrated_tf = self.tf_from_matrix(tracepen_calibrated_matrixnotation, "world", "tracepen_calibrated")

          # Braodcast the calibrated tf.
          self.tf_broadcaster.sendTransform(tracepen_calibrated_tf)

          rate.sleep()

if __name__ == '__main__':
  try:
    rospy.init_node('fmp_tracepen_node', anonymous=True)
    tracepenNodeHandle = TracepenNode()
    tracepenNodeHandle.run()
  except rospy.ROSInterruptException:
    pass
</code>```

I do not think there are errors in the remaining functions. Probably my calibration sequence is missing something I just can think about.