问:
Nao robot IMU data rates
I'm trying to stream data from the Nao's inertial unit in its trunk. However the update rate is quite slow ~ 1Hz. Is there any way to improve it? For reference, I issued the following command using qicli to measure the rates:

```<code>qicli call --json ALMemory.getListData "[[\"Device/SubDeviceList/InertialSensor/AngleY/Sensor/Value\"]]"
</code>```

In this example I retrieve the tilt angle of the trunk around the Y-axis (pitch).

To execute this command, I established an SSH connection to the Nao. I timed it using the linux time command. I also tried to force a faster read rate by issuing the above command in a loop with 5 milliseconds of sleep between each iteration:

```<code>for i in {1..100}; do qicli call --json ALMemory.getListData "[[\"Device/SubDeviceList/InertialSensor/AngleY/Sensor/Value\"]]"; sleep 0.005; done
</code>```

But even in this case I could see that the data was read at about a rate of 1Hz.

I tried it on Nao versions 5 and 6. I also connected both over WiFi and a link-locally using an ethernet cable.

Title: Nao robot IMU data rates


问:
Estimating the bicycle model using point sets from consecutive frames
I have two sets of points from two consecutive frames (restored from a video). The data represent points on the surface of a single-vehicle moving between frames. Points are in 3D and are assumed not to change in the $y$ axis (flat world) between frames. In each frame, we assume all points are of a single plain (The vehicle plane). The points are indexed and we can recognize the same point in different frames.

How do I apply the bicycle model in this case? It needs a steering input variable which I do not have, as well as a velocity input variable.

Since I can calculate $dx$ and $dz$ between consecutive frames, I think I can get $v$ somehow using:

$$v = \sqrt{\left(\frac{dx}{dt}\right)^2+\left(\frac{dz}{dt}\right)^2},$$

however, I do not have the frame rate $dt$, so I can only get the direction of $v$. Also, I don't know the size of the target vehicle, only some points, nor the direction of movement. How do I account for these? I need to take one of the points as a reference?

my final goal is to get a vector $(dx, dy, dz, d\theta)$ with $dy$ obviously $0$, representing the motion between frames.

Also, and this an intuition, Is it wrong to calculate $d\theta$ simply as the angle between the planes? My intuition tells me it is not that easy, however, I cannot think of a reason it is not correct.

ContentLicense: CC BY-SA 4.0


问:
PID controller for slowly varying system
I am making a robot that is required to move in a straight line, but it is slowly turning on the left or right, this error keeps accumulating (eventually resulting in a very large radius turn). So, now I have decided to use an IMU sensor to get the yaw value and use it in the PID controller. So I just want to know which combination of P, I, and D would be best for this application.</p>


问:
Electric scooter motor
Can a 240w motor comfortably drive an electric scooter weighing net 56kg (gross weight c120kg) at 45km/hr? I don’t get clear answers when I ask dealerships about why one advertised scooter has a motor 2000w whilst another 240, when the scooter weight/speed spec is similar. Many thanks if you can enlighten me.</p>

Title: Electric scooter motor


问:
Balance 2-wheels robot without making it drift forward/backward
I'm trying to design a controller to balance a 2-wheels robot (around 13kg) and making it robust against external forces (e.g. if someone kicks it, it should not fall and not drift indefinitely forward/backward). I'm pretty experienced with most control techniques (LQR, Sliding Mode Control, PID etc), but I've seen online that most people use LQR for balancing 2-wheels robots, hence I'm going with LQR.
My problem is that, despite I'm able to make the robot not fall down, it rapidly starts going forward/backward indefinitely, and I don't how to make it mantain a certain position on the ground. What I want to achieve is that, when the robot gets kicked by an external force, it must be able to stop moving forward/backward while mantaining the balance (it's not necessary to mantain a position on the ground, I just want the robot to stop moving).
The measurements to which I have access from the sensors are: position on both wheels (x), velocity of both wheels (x_dot), angular position of robot (theta), angular velocity of robot (theta_dot).
Since now I tried 2 approaches:

set all reference signals to 0 and try to tune the LQR gain. With this (simple) approach I'm not sure if the coefficients of gain K relative to x and theta should have same or opposite sign, because, if for example the robot gets kicked away from its reference for x, the wheels should move in the direction that makes the robot return to the 0 point, but this would make theta go in the opposite direction. When the robot gets kicked, I would like that first theta gets adjusted in order to brake the movement given by the external force, and then x_dot should go in the same direction as theta in order to stop the robot.

use best LQR gains that I could find empirically/with MATLAB and use some "heuristic" in order to, given the current state of the robot (x, x_dot, theta, theta_dot), choose the reference signals for the state variables. I tried the heuristic "if x_dot goes forward/backward, then make theta inclide backward/forward", which makes the robot avoid drifting forward/backward in case there're no disturbances, but if I kick the robot it starts oscillating really fast until it falls (I tried to adjust the K gain of LQR to solve this problem, but I couldn't find any that solved it).

Which approach would you suggest me to use? Should I implement some more sophisticated heuristics (any suggestion?) or should I just tune the LQR gain until I find the perfect one? Should I consider using an integrator (for controlling which states?) together with the LQR?

Any advice would be highly appreciated. I'm kind of desperate.


问:
Combining dynamic movement primitives to create new ones
this is my very first question and I want to thank everyone for the massive contribution to the community!

On to my question now, here is a quick definition of my idea/problem:
I have created a "set of knowledge" from dynamic movement primitives, [d1, d2, ..., dn] for the exact same task but for slightly different characteristics of the scenarios every time.
Given the "set of knowledge" of DMPs for different scenarios and also the characteristics of a completely new scenario, how can I create a new DMP for this new scenario using the existing "knowledge".

I was thinking of a way to represent the weights of the DMPs as Gaussians, apply weights to each one of the Gaussians and perform an evolution of algorithm to update the weights and keep the most impactful DMPs.

Please feel free to propose any other ideas, papers, techniques that could help me approach this problem.
Thank you in advance


问:
pointcloud2_to_xyz_array not giving good visualization for ROS1 but working for ROS2
I have 2 setups:
Setup #1: Ubuntu 20.04 focal Virtual cloud machine with arm64 architecture with ROS1 noetic, classic gazebo (which runs husky simulation from clearpath robotics)

Setup #2: Ubuntu 22.04 Jammy personal laptop with amd64 architecture with ROS2 humble hawksbill, ign gazebo fortress (which runs sample lidar visualization as example)

I am trying to segment the point cloud's ground and non-ground points. I wrote two scripts (one each for ROS1 and ROS2) to extract xyz co-ordinates from the topic (which contains VLP-16 lidar data) But before that, I wanted to verify whether the ros_numpy's pointcloud2_to_xyz_array method is doing the  math correctly by visualizing the XYZ co-ordinates using matplotlib and comparing with the actual point cloud visualization shown by rviz/ rviz2. For simplicity, robots are not moving and are static.

In Setup#1 (ROS1): Husky robot is spawned in an empty gazebo world.
points topic contains the message typesensor_msgs/PointCloud2. rviz shows the ground points as circular rings which is expected but the XYZ plot shows some random points in the middle which I did not expect.

```<code>ROS1 single message echoed by the topic: points

header:
  seq: 5908
  stamp:
    secs: 651
    nsecs:  33000000
  frame_id: "velodyne"
height: 1
width: 15000
fields:
  -
    name: "x"
    offset: 0
    datatype: 7
    count: 1
  -
    name: "y"
    offset: 4
    datatype: 7
    count: 1
  -
    name: "z"
    offset: 8
    datatype: 7
    count: 1
  -
    name: "intensity"
    offset: 12
    datatype: 7
    count: 1
  -
    name: "ring"
    offset: 16
    datatype: 4
    count: 1
  -
    name: "time"
    offset: 18
    datatype: 7
    count: 1
is_bigendian: False
point_step: 22
row_step: 330000
data: a lot of numbers over here
is_dense: True
</code>```

In Setup#2 (ROS2): Example robot is spawned in a children's playground.
point_cloud2 topic contains the message type sensor_msgs/PointCloud2. Both rviz2 and the XYZ plot using matplotlib shows the ground points as circular rings which is expected.

```<code>ROS2 single message echoed by the topic: point_cloud2

header:
  stamp:
    sec: 918
    nanosec: 800000000
  frame_id: vehicle_blue/lidar_link/gpu_lidar
height: 16
width: 1875
fields:
- name: x
  offset: 0
  datatype: 7
  count: 1
- name: y
  offset: 4
  datatype: 7
  count: 1
- name: z
  offset: 8
  datatype: 7
  count: 1
- name: intensity
  offset: 16
  datatype: 7
  count: 1
- name: ring
  offset: 24
  datatype: 4
  count: 1
is_bigendian: false
point_step: 32
row_step: 60000
data: a lot of numbers
is_dense: false
</code>```

I am not able to understand from where did the extra points come from in Setup #1?

```<code>Script used for ROS1/ Setup # 1

#!/usr/bin/env python
import rospy

from sensor_msgs.msg import PointCloud2
import numpy as np
import ros_numpy as rnp
import sensor_msgs
import math
from mpl_toolkits import mplot3d
import time

import matplotlib.pyplot as plt

class pointcloud_subscriber:
    def __init__(self):

        rospy.init_node('listener', anonymous=True)

        print("Entered class")
        self.fig = plt.figure()
        self.ax = plt.axes(projection='3d')
        self.ax.set_xlabel('X axis')
        self.ax.set_ylabel('Y axis')
        self.ax.set_zlabel('Z axis')

        rospy.Subscriber("points", PointCloud2, self.listener_callback)
        plt.show()
        rospy.spin()

    def listener_callback(self, msg):
        print("Listening START")
        #rospy.loginfo(rospy.get_caller_id() + "I heard %s", msg.data)
        # msg.__class = PointCloud2
        # offset_sorted = {f.offset: f for f in msg.fields}
        # msg.fields = [f for(_, f) in sorted(offset_sorted.items())]
        pc_np = rnp.point_cloud2.pointcloud2_to_xyz_array(msg,remove_nans=True)
        distance_array = np.zeros(shape=(pc_np.shape[0],1))
        for i in range(pc_np.shape[0]):
            distance = math.sqrt(pc_np[i,0]**2 + pc_np[i,1]**2 + pc_np[i,2]**2)
            #print(distance)
            distance_array[i,0] = distance
        print(np.amin(distance_array))
        print("Minimum distance index is: " + str(np.argmin(distance_array)))
        mean = np.mean(pc_np[:,2])
        sd = np.std(pc_np[:,2])
        data_ground = pc_np[(pc_np[:,2] < mean + 1.5*sd) & (pc_np[:,2] > mean - 1.5*sd)]
        data_wo_ground = pc_np[(pc_np[:,2] > mean + 1.5*sd) | (pc_np[:,2] < mean - 1.5*sd)]
        print(data_ground.shape, data_wo_ground.shape)

        j=0
        while j <= 10:
            self.ax.scatter(pc_np[:,0], pc_np[:,1], pc_np[:,2])
        # time.sleep(20)

        #print(distance_array.shape)
        #print(pc_np[1,0])
        print("Listening END. Size is: " + str(pc_np.shape))

def main(args=None):
    points_filteration = pointcloud_subscriber()

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

The only difference which I found between lidar message in ROS1 vs ROS2 is the height which is 1 in ROS1 and 16 in ROS2. I don't think it should make any difference in xyz point extraction. Please provide your viewpoints as well.

```<code>Script used for ROS2/ Setup #2

    import rclpy
    from rclpy.node import Node

    from sensor_msgs.msg import PointCloud2
    import numpy as np
    import point_cloud2 as rnp
    import sensor_msgs
    import math
    from mpl_toolkits import mplot3d

    import matplotlib.pyplot as plt

    class MinimalSubscriber(Node):

        def __init__(self):

            # print("Entered main function")
            # self.fig = plt.figure()
            # self.ax = plt.axes(projection='3d')
            # self.ax.set_xlabel('X axis')
            # self.ax.set_ylabel('Y axis')
            # self.ax.set_zlabel('Z axis')

            super().__init__('minimal_subscriber')
            self.subscription = self.create_subscription(
                PointCloud2,
                '/point_cloud2',
                self.listener_callback,
                10)
            self.subscription  # prevent unused variable warning

        def listener_callback(self, msg):
            # self.get_logger().info('I heard: "%s"' % msg.data)
            #print("Listening START")
            #msg.__class = PointCloud2
            #offset_sorted = {f.offset: f for f in msg.fields}
            #msg.fields = [f for(_, f) in sorted(offset_sorted.items())]
            pc_np = rnp.pointcloud2_to_xyz_array(msg,remove_nans=True)
            distance_array = np.zeros(shape=(pc_np.shape[0],1))
            for i in range(pc_np.shape[0]):
                distance = math.sqrt(pc_np[i,0]**2 + pc_np[i,1]**2 + pc_np[i,2]**2)
                #print(distance)
                distance_array[i,0] = distance
            print(np.amin(distance_array))
            print("Minimum distance index is: " + str(np.argmin(distance_array)))
            mean = np.mean(pc_np[:,2])
            sd = np.std(pc_np[:,2])
            data_ground = pc_np[(pc_np[:,2] < mean + 1.5*sd) & (pc_np[:,2] > mean - 1.5*sd)]
            data_wo_ground = pc_np[(pc_np[:,2] > mean + 1.5*sd) & (pc_np[:,2] < mean - 1.5*sd)]
            print(data_ground.shape, data_wo_ground.shape)

            # self.ax.scatter(pc_np[:,0], pc_np[:,1], pc_np[:,2])
            # plt.show()

            #print(distance_array.shape)
            #print(pc_np[1,0])
            print("Listening END. Size is: " + str(pc_np.shape))

    def main(args=None):
        rclpy.init(args=args)
        minimal_subscriber = MinimalSubscriber()

        rclpy.spin(minimal_subscriber)

        # Destroy the node explicitly
        # (optional - otherwise it will be done automatically
        # when the garbage collector destroys the node object)
        minimal_subscriber.destroy_node()
        rclpy.shutdown()

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

Please help.

[UPDATE]: I tried to simulate Setup #2 with no environment and found that the XYZ plot also shows the bad plot (lots of extra points in the center) just like Setup #1. Upon closer inspection, I feel it is because of the scale of the z-axis. For e.g. In Setup #1 bad figure, Z-axis scale ranges from 1.0350 metres to 1.0550 metres or 103.5 cm to 105.5 cm which means that it varies by 2 cm only. If I magnify the plot, visualization becomes even worse. Although, in an ideal world, all the lidar rings should be perfectly horizontal but it seems that simulation is not giving such results which are also not visualized in rviz by naked eyes. So, pointcloud2_to_xyz_array seems to be working fine. I hope that it is a convincing answer to my own question and for everyone who is reading it. Please feel free to add your viewpoints.

Thanks,
Dev


问:
How to derive the kalman gain with the form of K=Pxz/Pz?
please see the formula and reference in the page https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/10-Unscented-Kalman-Filter.ipynb

Traditional formula of gain is expressed like the form in the wiki: https://en.wikipedia.org/wiki/Kalman_filter

But how to derive the form as K=Pxz/Pz?


问:
Math for video stabilization per axis translation with Accelerometer not gyro
Moth stabilization math is around gyro based sensors (pitch, roll and yaw) however they cant correct per axis movement. But in many phones digital stabilization methods uses accelorometer to do that. Does anyone know the math behind using accelorometer to stabilize end video?</p>


问:
Is there a way programmatically transform coordinates (and the derivations) from one frame to another?
I got a question like this:

assuming there are several cartesian coordinate systems (all are 2D or 3D, also if there is a universal solution can covers 1D or 4D or even higher dimensions will be beautiful though not neccessary).

one frame is refered as world-frame(refered as W, which is fixed, ground-truth), motion info of two obejcts (refered as X,Y) is measured according to this world-frame. we got

```<code>XW = [
      xw1(0) , xw1(1) , xw1(2), ... xw1(m);
      xw2(0) , xw2(1) , xw2(2), ... xw2(m);
      xw3(0) , xw3(1) , xw3(2), ... xw3(m);
      ...
      xwn(0) , xwn(1) , xwn(2), ... xwn(m);
     ]
</code>```

this matrix XW in size of (n, m) means the measurements of object X w.r.t frame W, where xwn(m) mean the m-order derivative of the n-th measurement, e.g. in a 2D case,

xw1(0) is position in x axis in W, xw2(0) is position in y axis, xw3(0) is yaw/heading angle in the W frame;

then

xw1(1) is velocity in x axis in W, xw2(1) is velocity in y axis, xw3(1) is yaw-rate in the W frame;

also

xw1(2) is acceleration in x axis in W, xw2(2) is acceleration in y axis, xw3(2) is angular acceleration in the W frame;

if this is a 3D case , xw1(0)~xw6(0) should be x/y/z/pitch/yaw/roll, xw1(1)~xw6(1) should be vx/vy/vz/pitch-rate/yaw-rate/roll-rate, xw1(2) ~ xw6(2) should be correspoding (angular-)acceleration, xw1(3)~xw6(3) shoudl be the corresponding jerk;

besides, not all DOF is neccesary for measure, that is to say, for example in a 3D we only have xw1~wx4 (maybe x/y/z/yaw) for concern and calculation.

similar there is a YW measurement;

next, we have a local-frame fixed to object Y , my question is whether there is a way that can programmatically transform coordinates XW to XY according to the info of XW and YW we got?

where XY means measurement of obejct X w.r.t the frame fixed to Y, i.e.

```<code>XY = TRANSFORM(XW, YW)
</code>```

what is this TRANSFORM? any theoretical support? or formulas that can be programmatically implemented?

this problem in reality could be as follow: i got a global sensor can detect two robots' motion according to ground, and share this information between the two robots, then without other information(or more sensors deployed on robots), one robot could calculate the other one's relative motion w.r.t itself, just by calculating the TRANSFORM.

I have investigated something, but looks like not enough, e.g. :

tf2 looks like can only handle the position transform but not velocity/acceleration/rotational motion;

theoretical mechanics and transport motion may involve with this, but looks not a programmatically way and involves a lot of formula-deduce according to specific scenarios.

lie-groups looks like can do this but I only found some formula proof process, didn't find a clearly conclusion of how to use it, if any practical experience would be a great help;

thanks for any advice and discussion.


问:
How to get position using a 9 dof IMU without GNSS
First and foremost, yes, I understand that without some external sensor I will experience drift using the double acceleration of the accelerometer. My question is two fold first and foremost is there a simple python library or anything else where one could simply plug-in the 9 dof data I receive from my IMU and simply get x,y,z coordinates in return? That would greatly simplify my work load.
Else does anyone know how I would convert the accelerometer, gyroscope, magnetometer data into positional data using Python?

Any help or direction is greatly appreciated.


问:
Which scan matching technique is most suitable for 2D laser range data?
I have odometry data [x, y, theta] and 2D laser range data from a robot moving in a building.

Based on a new scan, I want to match it with a previous scan to get a corrected pose estimation for the robot. I have seen ICP being used as a method to do this, but wondering if there is an 'optimal' method to achieve this since it seems computationally expensive, especially since I have many scans per observation (180). Are there any modules/libraries available in Python that can do this without having to develop my own algorithm?


问:
What type of motor (size, type, approx cost) would be best to use to open a bedroom window
I noticed a tag showed up that indicates a servomotor. This looks like what I want. My new question is what size of a servomotor do I need to move a window that is approx 3 feet by 2 ft 8 inches.Thanks!!</p>


问:
Occupancy grid height
I need to create an occupancy grid (2D) from pointcloud but i need to show also the height at every cell with colors. Right now i know that the occupancy grid is only on grey color, there is an option to change the color of the cell?</p>

Title: Occupancy grid height


问:
Why Potential Energy in Spong's book is positive?
All books I've came across (i.e. Craig, Siciliano, Frank, Niku, and Carlos)  state the potential energy of a $i$th link is negative except in Spong's book

Is there a particular reason for the potential energy to be positive in this book?


问:
Hardware Requirements to run Image Recognition Model on Raspberry Pi
I have trained and saved a Tensorflow model that would detect if workers are wearing a PPE or not.
I want to deploy it using the Raspberry Pi hardware. Following is the list of hardware that I think I would need

Raspberry Pi 400 Personal Kit (Includes keyboard Mouse)

Raspberry Pi Touch Display

Raspberry Pi Camera Module 2 NoIR

Micro SD card

I am confused if I should also acquire Intel® Neural Compute Stick. If yes why? How would it add value? Is there anything that I am missing that I would need to deploy the model?


问:
PID controller feasibility
I'm trying to control a hybrid inverter to manage a selfconsumption mode bypassing its native mode - meaning to distribute power coming from solar and into/from battery to home consumption and grid.

Aim of selfconsumption is to minimize the grid import/export so to make the most from solar and battery power usage.

The readings sample rate from my sensors is 1 second and give me measurements for grid power, home consumption power, solar power and battery power.

What I've tried is to distribute the (solar_power - home_consumption_power)Watts into/from the battery by setting the desired battery power setpoint each second.

However, this open loop gives me an overshoot (possible explanations AC/DC conversion, losses), which leads to grid power import/export leakage.

Question is if a PID approach could be used to improve this error, given the specs for

reading measurements every 1 second

changing the setpoint for battery power every 1 second

If not, any other ideas?

Title: PID controller feasibility


问:
Implementation of the PID loop over simulink for Pixhawk
i am currently working on my Master degree to implement an adaptive control Law , so i need to program a control loop for the Pixhawk over simulink, i worked on it for 3 week and i still not have a convincing result , the drone oscillate a the take-off and i don’t know what’s wrong with all my methodology , the pictures here resume the PID loop that i have programmed on simulink maybe someone can help me with this, i tried to tune the LPF of derivative term and maybe there is a wrong sampling frequency on the loop ? i use 1kHz for all the control block .


问:
What formats are used to describe trajectories in robot simulator programs?
I am working for a university on a general tool for improving trajectories/cycles in robotic cells. As it should be general and not company/simulator-specific, I am trying to find common information which can be exported from most of today's simulators to design it for simple connection into existing cell-designing processes in plants.

What formats do the modeling tools use? I know there is not a simple or general answer, I would appreciate concrete examples for each option. Which are the prefered ones in practice?

I wanted to do this whole research by myself but it would take extreme time - I started with ABB RobotStudio but I am still not sure which all exporting options it provides. Also, as in other cases, a trial version does not provide all possibilities which are used in practice.

I would be grateful if you shared your knowledge of some robotics modeling tools with examples, e.g. which robot language it generates, how it exports the trajectory and other information, and what is used in practice. As I am not experienced in the particular tools, also any link to some useful documentation or forum would be great to better understand the examples or to be able to ask there for more information.

I was thinking about those tools:

ABB RobotStudio

Process Simulate

WinCaps

WinCaps Plus

Siemens NX CAM

Octopuz

Visual Components

SolidWorks

Sorry for asking a general question here, I am also trying to contact some companies to share their experiences. Thank you.


问:
What is the recommended textbook for Network Robotics (swarming behavior of drones using graph theory)?
I watched the Robotarium videos on Youtube:  https://youtu.be/ujejSIKB57g?t=214

There are many slides with math equations shown on the video but are there books that teach the prerequisite math and the actual materials to write programs that enable this type of swarming behavior?


问:
Improve four wheel steering system
I built a robot with a four wheels steering system where an absolute encoder is mounted on each wheel.

I'm considering 0° when the wheel is steered on the left, 90° when the wheel faces forward and 180° when it is rotated to the right. I mapped the encoders values for each of these three positions so I can move correctly all the wheels around these positions by using C++ code.

Now, the problem is that I would like to be able to synchronize the movements of each pair of wheels (front and rear) and to cover also the intermediary positions.

I would also like to improve the positioning since the encoders usually provides different readings for the same position (i.e. 230, 232, 292, 230) so the wheel oscillates around the chosen position.

What is a good solution to achieve this? What is the most popular method used for this?

At the moment, I'm just running a while() loop moving each DC motor until the encoder readings match the desired position.
Can I use a Kalman filter to improve the positioning?

Title: Improve four wheel steering system


问:
Gating/Filtering spurious measurements for redundant sensors using Kalman Filter
I am using a simple Kalman filter to fuse two redundant range finders (1D) and the data is rich in outliers/spikes. The observation matrix is as follows:

```<code>z = [z1, z2].T
</code>```

I use a gating method to filter outliers/spikes by comparing the current residual with the current sensor covariance.

```<code>GATE_LIMIT = 2
if(z1 > GATE_LIMIT * P and z2 > GATE_LIMIT * P):
        print("Rejected Z= ",z1,z2)
        continue
</code>```

This filters sudden spikes when both sensors go rogue together. But what should I do if only one of them gives such a faulty value ?

The output of the filter is as follows:


问:
How to identify simulink blocks contributing to unstable pole during linearization
I have a simulink model resulting in a state space model using linearization at a steady state condition. The resulting statespace model of order 135 shows an unstable pole contributed by a particular block/path in the model. However, when use stabsep command, the resulting linear part has 134 states which are all stable. The nonlinear model has one state which is unstable. Can anyone help with any link/suggestion how to identify the block which caused the unstable state</p>


问:
In which specific scenarios does MoveIt initialize a separate node with the name `\move_group_commander_wrappers_...`?
I am trying to use MoveIt Python interface to send commands to my robot simulated in Gazebo Environment.

In scenario 1, when I launch the gazebo world (using launch file) and spawn my robot, the rosnodes created are as follows:

```<code>/controller_spawner
/gazebo
/move_group
/rosout
</code>```

However, when I use a python script and launch the gazebo world, followed by spawning the robot and initializing the MoveIt interface, an additional rosnode is also created as:

/move_group_commander_wrappers_1659372280293177942

On doing rosnode info /move_group_commander_wrappers_1659372280293177942, I get the following output:

```<code>
--------------------------------------------------------------------------------
Node [/move_group_commander_wrappers_1659372280293177942]
Publications:
 * /rosout [rosgraph_msgs/Log]

Subscriptions:
 * /clock [rosgraph_msgs/Clock]

Services:
 * /move_group_commander_wrappers_1659372280293177942/get_loggers
 * /move_group_commander_wrappers_1659372280293177942/set_logger_level

contacting node http://100.71.110.30:41023/ ...
ERROR: Communication with node[http://100.71.110.30:41023/] failed!
</code>```

Can someone please explain why this new node is created and how can this avoided?

Note, in both cases, the MoveIt python interface class initialization is done as follows:

```<code>rospy.init_node('my_robot', anonymous=False)
moveit_commander.roscpp_initialize(sys.argv)
</code>```


问:
ROS - Load different map/world in a sequence to evaluate navigation algorithm
I want to analyze my path planner algorithm, so I must evaluate this algorithm in hundreds of situations. As a result, I need to load hundreds map in Rviz and Gazebo in a sequence and record the generated control commands. For each map, this code will record control commands for evaluating the path planning algorithm.

Is it possible to load different map/world files in a "for loop" (in a sequence)?


问:
Servo motor MG09 is not working. Gives a Tick Tick sound
I have built a CNC plotter machine and in the metal gear servo motor, when I have a code from UGS like M03 S80, it gives a continuous tick tick sound. But not rotating. if I give a small push from my hand, then only its rotating to 80 degrees. if we put  M05 S10 code, that also the same.

My i know the reason for it?. It worked perfectly previously. But from now its giving some sound without any movement. The spring i use in the pen gives some friction. Is it the issue for this?


问:
Are there low cost options for producing high pressure at low flow rates?
I'm looking for a low-cost way for a device to produce up to 4 bar pressure.  Flow rate at that pressure almost doesn't matter; 2L per minute would be ample.  All the options available seem very over-specced for this job - or maybe I'm just googling the wrong thing?

For anyone curious, I'm trying to measure the depth of a water column.  Depth is up to 40m.  I want to measure by putting a piece of PVC tube down the column, pumping air down it until it comes out the other end, then measuring the pressure at the surface.  The whole volume of the (4mm internal diameter) tube is about half a litre so a flow of 2LPM would mean pumping for 15s with each measurement.

Apologies for the slightly inaccurate tag; I couldn't find anything really on-topic and don't have the reputation to create new tags.


问:
build your own nodes or just launching prebuilds from from MoveIt2 package?
I am fairly new to ros2 (galactic) and I want to control a manipulator in rviz2 (later in reality) with a RGB-d camera (realsense, kinect, ...) for various positioning of the end-effector in space. Thus, I want to make use of an occupancy grid for collision avoidance.

The API of the MoveIt2 seems most suitable for such a task.
An interesting tutorial already exists in the documentation:
https://moveit.picknik.ai/galactic/doc/examples/perception_pipeline/perception_pipeline_tutorial.html

Now, I am asking myself, how to reproduce a similiar system for my described use case.

Do I need to code my own nodes to instantiate the perception pipeline etc. (like in the tutorials) which seems to me very intense.

or is it possible to obtain my desired ros2-framework with all necessary nodes just by configuring .launch files to run prebuild MoveIt2 nodes? i.e. I obtain a /pointcloud2 topic from a sensor_node and I can somehow initialize a controller_node from MoveIt2 and feed the /pointcloud2 and other topics to it.

if somebody could give me a brief explanation how to handle MoveIt2 efficiently with less coding effort, I would strongly appreciate that!!!


问:
How to use Nav2, slam_toolbox with odom data, gps and imu sensors?
Setup details: ROS2 foxy on amd64 architecture CPU with nav2 and slam_toolbox installed

Robot is Clearpath husky with Velodyne VLP-16 lidar, IMU and GPS sensor in gazebo. Can see data on every topic

Long term Objective: Provide gps co-ordinates as goal / way points and autonomously navigate robot to the destination with the help of Nav2 stack by using slam_toolbox

Short term objective: Obtain a stable map (drift free)/ no shaking behavior (if that's possible) using slam_toolbox which updates when obstacles are removed from environment.

Below are the topics. Sometimes /odometry/local is present, sometimes not even though the node is running through launch file. Also, ros2 node list does not show anything which seems weird to me. But in another round, it works (surprised, seems like some foxy bug to me)

```<code>/clock
/cmd_vel
/diagnostics
/downsampled_costmap
/downsampled_costmap_updates
/e_stop
/global_costmap/costmap
/global_costmap/costmap_updates
/goal_pose
/gps/data
/gps/filtered
/husky_velocity_controller/cmd_vel_unstamped
/imu/data
/initialpose
/joint_states
/joy_teleop/cmd_vel
/map
/map_updates
/odom
/odometry/global
/odometry/gps
/parameter_events
/plan
/robot_description
/rosout
/scan
/tf
/tf_static
/twist_marker_server/cmd_vel
/velodyne_points
/waypoints
</code>```

My workflow is as below.

Spawn the robot in gazebo, all the sensors are outputting data.

Run ros2 launch pointcloud_to_laserscan sample_pointcloud_to_laserscan_launch.py to convert 3D point cloud to 2D laserscan on /scan topic which can be used later on by slam_toolbox

Since the odometry information (from topic /odom from wheel encoders) is know to have drift in real life, its good to use EKF to fuse odometry data from other sensors (IMU and GPS). There are 4 scenarios/ combinations described down in the post and this is how I am calling the nodes in the launch file (control.launch.py present at the google drive link (had to finally upload as could not represent the code in code view)). I just comment ld.add_action(node_ekf_local) if I don't want to run the ekf_filter_node_odom as an example and so on.

Content of the yaml configuration file provided by config_husky_ekf are provided by localization.yaml present at the google drive path which contains configuration for three nodes: ekf_filter_node_map (or global), ekf_filter_node_odom (or local), and navsat_transform_node (to convert gps co-ordinates to odometry data)

I then tried 4 scenarios: Configs and videos of all 4 are present here: https://drive.google.com/drive/folders/16_x99OUOEJZVyFfYeAMvAYkP9elPXNxH?usp=sharing

1_no_ekf_original_odom_only_slam_toolbox_TF_yes_robot_OKayish_but_map-no_update: EKF node is not running (no sensor fusion), original /odom data is used; slam_toolbox is publishing the map frame, /map topic and the related tf. Robot motion seems okayish to me because there is still little bit of drift between the map and 2d laserscan/ 3d pointcloud showing obstacles when the robot rotates. When an obstacle is removed from gazebo, the map does not update in rviz.

2_ekf_local_only_slam_toolbox_TF_yes_robot_OKayish_but_map-no_update: EKF node is running but fusing only odom and imu data i.e. local one and publishing odom to base_link transform. slam_toolbox is publishing the map frame, /map topic and the related tf. Robot motion seems okayish to me because there is still little bit of drift between the map and 2d laserscan/ 3d pointcloud showing obstacles when the robot rotates. When an obstacle is removed from gazebo, the map does not update in rviz.

3_ekf_local_global_slam_toolbox_TF_yes_robot_going_coming_after_motion: EKF node is running but this time both local (fusing odom and imu) and global (odom, imu and gps odometry (on the topic /odometry/gps) are running. Since, the ekf_filter_node_map (global one) is running, /map frame and its related tf is present this time. Run slam_toolbox using the default setting transform_publish_period: 0.02 #if 0 never publishes odometry which messes up the story because two nodes (ekf_filter_node_map and the one by slam_toolbox) are publishing different tfs for the same frames which is shown by erratic behavior in rviz. Although the same is not visible in tf2_echo probably because of the less frequency at which it is showing the TFs.

4_ekf_local_global_slam_toolbox_no_TF_robot_gone_after_motion: In order to avoid the issue observed in #3, I set transform_publish_period: 0.0 #if 0 never publishes odometry; The map to odom transform publish period. 0 will not publish transforms. Now, Both EKF nodes (local and global) are running. Since, the ekf_filter_node_map (global one) is running, /map frame and its related tf is present this time as well. As soon as slam_toolbox is ran, shaky behavior is observed no more (such a relief but not for too long!!!) The map is not aligned with the obstacles and as robot starts to move, robot vanishes from the display because the tf's translation between map and odom frames becomes a very large number.

I think the third approach should be the best but it has some issues which I described earlier. I tried tuning the parameters a lot but of no use. Please suggest the best way to achieve the stated objectives and tell if the long term objective is contradictory with the short term. Thanks a lot in advance.


问:
ros2 humble cannot build custom messages or services
I am trying to compile multiple packages in ros2 humble. I am trying to compile the ackerman messages package as well as the franka ros2 meta-package (more specifically, the franka_msgs package). I see that there are custom messages and services involved. I followed the instructions to build the franka package. I also simply cloned the ackerman package into my ros 2 workspace like any other package. Both return this same error:

--- stderr: ackermann_msgs
gmake[1]: *** No rule to make target 'ackermann_msgs__py/CMakeFiles/ackermann_msgs__py.dir/all', needed by 'CMakeFiles/ackermann_msgs__rosidl_generator_py.dir/all'.  Stop.
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2
---
```
<p>I looked in the cmake files and they both appear to create messages correctly. I saw that there were changes recently from Foxy to Humble, but I don't see how they are major breaking changes. It may be that I simply don't understand how to compile messages in Humble. How do you compile custom messages and services (and actions too) in ROS2 Humble?
Here are some resources I have referenced:</p>
```https://answers.ros.org/question/390451/colcon-build-fails-on-anything-with-messages-now-after-ubuntu-2004-foxy-sudo-apt-upgrade/
https://answers.ros.org/question/401345/ros2-humble-unable-to-compile-custom-srv-which-depends-on-msg/
https://stackoverflow.com/questions/71970577/ros2-custom-messages-build-failed-with-invalidfielddefinition
https://robotics.stackexchange.com/questions/23171/creating-a-custom-msg-in-ros2
```


问:
What is the right hand screw rule in robotics? How does it help in finding the sign(+ve/-ve) of the angle?
I was studying DH Paramters, in the lecture the professor said the link twist will depend on the direction of x axis we choose. Can someone elaborate how is that so using the right hand screw rule(I don't know what this rule is).

For example why is alpha 1 -90 degree and not 90 degree.
Similarly it would be great if we can illustrate the same reasoning on the joint angle.


问:
send goal to action server moveit2
I initiate the demo of the default panda arm in rviz that comes with the tutorials:

ros2 launch moveit_resources_panda_moveit_config demo.launch.py

and now I want to send a pose in x,y,z world frame coordinates via action. I.e. it can be done c++ as described here:

https://moveit.picknik.ai/galactic/doc/examples/move_group_interface/move_group_interface_tutorial.html#

how can i just send a goal, like a pose, via ros2 action send_goal so that I can drive to it in rviz from terminal or python script for example?

Thank you in advance!

Title: send goal to action server moveit2


问:
My LSM303 magnetometer values are stuck
My Raspberry Pi Pico is connected to a 9 DOF IMU like this one, Adafruit 9-DOF IMU Breakout - L3GD20H + LSM303, through an I2C connection.

For some reason, whenever I try and get values from the magnetometer, the values I get barely change, even when I move the IMU around.

This is the code I wrote for the Pico:

```<code>import adafruit_lsm303dlh_mag
import board
import busio

i2c = busio.I2C(board.GP21, board.GP20)
sensor_mag = adafruit_lsm303dlh_mag.LSM303DLH_Mag(i2c)

while True:
    mag_x, mag_y, mag_z = sensor_mag.magnetic
    print(f"{mag_x:<10}{mag_y:<10}{mag_z:<10}")
</code>```

These are the approximated values I get back from it while moving it around:

```<code>-51.1818  -49.0909  -417.959
-51.4545  -50.0909  -417.959
-51.6364  -48.7273  -417.959
-51.2727  -48.4545  -417.959
-51.2727  -49.2727  -417.959
</code>```

The gyroscope and the accelerometer seem to be working fine. Is my magnetometer broken or am I missing something?

Title: My LSM303 magnetometer values are stuck


问:
ROS auto complete not running on Windows 10
I installed ROS1 on my Windows 10 machine according to
http://wiki.ros.org/Installation/Windows ,
I couldn't install windows terminal so I use "x64 Native Tools Command Prompt for VS 2019"

But I noticed that ROS auto complete is not working.
I make sure that "c:\opt\ros\noetic\x64\setup.bat" is executed when starting the "x64 Native Tools Command Prompt for VS 2019" and I call the batch explicitly but auto complete is still not working

How can I enable it?


问:
Would it make sense to use the unscented transform for linear problems too?
I've just learned about the unscented Kalman filter and I have a theoretical question. Suppose our innovation and measurement processes are linear but we know the initial state covariance and/or the measurement noise is not gaussian. Nevertheless, suppose we happen to at least know the mean and covariance of these non-guassian distributions. Would it then be more sensible to use the unscented transform (instead of the vanilla KF equations) to better model transformations of these non-guassian distributions?</p>


问:
Compute acceleration / spatial acceleration corresponding to additional control torque / external force for some open robotic chain
Given a robot ( open chain ) for which we know q,q_dot, q_ddot, and Tau_{measurement}. (one can consider that these parameters are found using some sensors attached to the robot) I would like to be able to compute the acceleration that corresponds to some extra spatial external force (think of the dynamics in a Featherstone setup)

consider inverse dynamics:

Tau_{measurement} = ID(q,q_dot,q_ddot,f_ext)

The inertia is unknown. This setup corresponds to some system identification where we want to find out the inertia/mass/center of mass for each link.

For this, it would be useful if I can add the external force (which can be, for that matter, even some control torque) not as a numeric value but as the product of I_i @ A_ext. For this, it will be helpful to try to estimate/find out the corresponding acceleration introduced by that external force. This will help a lot during the parametric estimation of inertia/mass/center of mass as the acceleration produced by external force can have different values (in contrast to gravitational acceleration which is constant in direction and magnitude) and because it can be easily shown that inverse dynamics can be rewritten as a linear combination of some matrices ( different matrix corresponding to each link ) containing spatial inertia/mass/center of mass.


问:
PointCloud2 parse to xyz array in ROS2 with python
In ROS1 you can convert a pointCloud2 message to an xyz array with sensor_msgs.point_cloud2.read_points().

Unfortunately, this option has not yet been adapted for ROS2.

What other options are there to obtain this.


问:
What geared mechanisms can convert various weak stepper motors drive inputs into a higher torque output?
I'm interested in making an arduino robotic arm for something that need precision and/or torque (like CNC), but first, I'm exploring/searching what I would need and how much it would cost.

What I intend to do is making its body as sturdy and solid as possible to minimise vibration, however, this means the body will become quite heavy.

But the heavy duty high-precision stepper motors are quite expensive (in my country's currency, of course), and if I need more than 3, it would cost too much for me.

I thought on using gear reduction to increase the the torque of a really small and cheap stepper motor, but I'm afraid it would be incredible slow. I'm not quite interested on super higher speeds, but something faster than a snail would be nice.

So I was wondering if there is a mechanism that allows multiple drive inputs in a single axis to increase torque without too many reduction gears.


问:
How to fuse IMU with encoders in EKF
Background

I have a car-like mobile robot (4 wheels, where the forward ones are steering wheels) and I want to estimate its pose and velocity assuming 2D planar motion. I'm trying to solve this problem by setting up an EKF.

The state vector that I want to estimate is composed as:
$$
\textbf{x} =
\begin{bmatrix}
x \\
y \\
\theta \\
v \\
\omega
\end{bmatrix}
$$

Where:

$x, y$ and $\theta$ is the pose of the vehicle and it is expressed in a global frame named map

$v$ and $\omega$ are the linear and angular velocity of the vehicle expressed in a local frame attached to it named base link

The sensors that I have on this vehicle are the following:

Velocity Encoders (rear wheels) + Steering angle (forward wheels): these data come directly from the low level hardware of the vehicle. I want to use these data as input in the propagation step of the filter by using a bicycle kinematic model as motion model.

IMU providing linear acceleration $a^I_k$ and angular velocity $\omega^I_k$ in the base link frame

GPS receiver which provides lat and lon coordinates of the vehicle. The lat and lon will be preprocessed and converted in the map frame, thus providing $x_G$ and $y_G$ position information.

EKF Formulation

Propagation Step

As previously said, I want to use a bicycle kinematic model and the "vehicle feedback data" (encoders + steering angle) to perform the state propagation step.

From wheel encoders I can easily retrieve vehicle linear velocity, thus the input of the bicycle model will be $u_k = [v^u_k, \delta^u_k]^T$.

We have also to take into account uncertainty in the data provided by the vehicle and we model this uncertainty as a zero mean gaussian noise acting on both the terms of the input $u_t$:

$$
u_k = u^r_k + w_k
$$
where $u^r_t$ is the real input and $w_t$ a gaussian noise term with zero mean and covariance matrix $Q_k$:
$$
Q_k =
\begin{bmatrix}
\sigma^2_v & 0 \\
0 & \sigma^2_\delta
\end{bmatrix}
$$

Then we just need to linearize and compute Jacobians $F_k$, $L_k$ and we are ready to propagate the state every time a new vehicle feedback data arrives by using the bicycle model. The state prediction step involves also the propagation of the uncertainty by increasing the state covariance matrix.

The predicted state and covariance at time $k$ are thus obtained as following:

$$
x^p_k = f_{bicycle}(x_{k-1}, u_k)
$$
$$
\Sigma^p_k = F_{k} * \Sigma_{k-1} * F^T_{k} + L_{k} * Q_k * L^T_{k}
$$

Up to now it is everything fine and the filter works as expected, by estimating the vehicle state and propagating the uncertainty as new data arrive.

IMU Correction Step

Here is where problems start arising.

From IMU I get vehicle linear acceleration $a^I_k$ and angular speed $\omega^I_k$. My idea is to integrate these data to retrieve also an "indirect" measurement of the other state components by using standard motion laws:

$$
x^I_k = x^I_{k-1} + (v^I_{k-1} \Delta_k + \dfrac{1}{2} a^I_{k} \Delta^2_k) \cdot cos(\theta^I_{k-1}) \\
y^I_k = y^I_{k-1} + (v^I_{k-1} \Delta_k + \dfrac{1}{2} a^I_{k} \Delta^2_k) \cdot sin(\theta^I_{k-1}) \\
\theta^I_k = \theta^I_{k-1} + w^I_k \Delta_k \\
v^I_k = v^I_{k-1} + a^I_{k} \Delta_k \\
\omega^I_k = \omega^I_k
$$
I will use $f^I_k(\cdot)$ to refer to these system of equations.

Please notice that:

$f^I_k(\cdot)$ can be seen as a state propagation function stored internally by the IMU subsystem

this propagation is done with respect to the previous "IMU" state and not to the state vector $x_k$ of the EKF (I do this to prevent the IMU indirect measurements to get biased by the filter)

All these things mean that the IMU subsystem will provide to the EKF a (indirect) measurement obtained by an integration of the IMU state performed internally by the IMU subsystem.

In conclusion, the IMU measurement model for the EKF results to be:

$$
z_k = x^I_k = f^I_k(x^I_{k-1},I_k) = h(x^p_k)
$$

Where $h(x^p_k)$ is the usual function that "maps" the predicted state to the measured quantity needed to compute the innovation term of EKF. For this case $h(x^p_k)$ is simply an identity function since from the IMU we get (directly or indirectly) the state variables.

Clearly I also want to take into account the uncertainty of the IMU input data $I_k = [a^I_k, \omega^I_k]$ by including a zero mean gaussian noise:

$$
I_k = I^r_k + v_k
$$

where the covariance matrix of the IMU noise $v_k$ is named $R_k$ and defined as:

$$
R_k =
\begin{bmatrix}
\sigma^2_a & 0 \\
0 & \sigma^2_\omega
\end{bmatrix}
$$

Now we are ready to compute the Jacobians of the measurement model. Generally this means to compute $H_k = \frac{\partial h}{\partial x_k}$ and $M_k = \frac{\partial h}{\partial v_k}$.

In our case, $H_k$ will be computed as expected and will result to be a 5x5 identity matrix.

A different reasoning must be carried out for $M_k$, which is the Jacobian expressing how the uncertainty affects the measured quantity. In my opinion, since the IMU measurement is obtained by integrating the IMU input it is correct to integrate also the noise $v_k$ acting on the IMU input $I_k$. This means that we need to compute a sort of covariance of the "IMU state" $x^I_k$ from the IMU propagation function $f^I_k(\cdot)$, and we will call this covariance $\Sigma^I_k$.

We can do this as we did in the propagation step, i.e., we compute Jacobians of $f^I_k(\cdot)$ with respect to $x_k$ and to the noise $v_k$:

$$
F^I_k = \frac{\partial f^I_k}{\partial x_k} \\
L^I_k = \frac{\partial f^I_k}{\partial v_k}
$$

In conclusion, in the internal IMU subsystem we will maintain a sort of EKF propagation step made as usual:

$$
x^I_k = f^I_k(x^I_{k-1}, I_k) = z_k
$$
$$
\Sigma^I_k = F^I_{k} * \Sigma^I_{k-1} * (F^I_{k})^T + L^I_{k} * R_k * (L^I_{k})^T
$$

Finally, we are ready to perform the classic Correction Step of the EKF:

$$
K_k = \Sigma^p_k * H^T_k * (H_k * \Sigma^p_k * H^T_k + \Sigma^I_k)^{-1} \\
x_k = x^p_k + K_k * (x^I_k - h(x^p_k)) \\
\Sigma_k = (1 - K_k * H_k) * \Sigma^p_k
$$

My first question is thus to know whether my IMU correction step approach is correct or not.

The second important question that I have is: how to handle the fact that the "IMU state" covariance $\Sigma^I_k$ grows indefinitely? Is this right as it is?
I mean, I would expect that the EKF filter made of only Encoder+steering and IMU will drift over time and thus its associated covariance $\Sigma_k$ gets bigger and bigger, but letting the IMU covariance grows indefinitely would mean to let the IMU correction to have less weight as the time increases. And this doesn't sound good to me.

One idea to solve this could be to add a last step in the correction where I set IMU covariance to be equal to the state covariance, i.e.:
$$
\Sigma^I_k = \Sigma_k
$$
In this way, at each iteration of EKF I start with an IMU which has same covariance as the system one; then, only the added noise term provided by the bicycle propagation step and the IMU measurement step will play the difference in computing the Kalman gain (i.e., who will have more weight in the correction step).

If you have other ideas then this, please let me know.
Thanks in advance to anyone who will help me.

p.s. I know that I told that I have also gps, but since I know how to integrate it into EKF, I didn't want to include it into my question

p.p.s I know that IMU has bias, but for now it is okay for me to neglect it

p.p.p.s I had a look at this question, however it doesn't explain what I'm asking here

p.p.p.p.s sorry for the lenght of my question, but I wanted to be exhaustive and clear as much as possible

Title: How to fuse IMU with encoders in EKF


问:
robot_localization ros package: UKF estimate jump but input did not
The UKF is configured to fuse odometry, a reference pose (using ndt matching), and IMU data. But although the robot is standing and all sensors are telling that it is not moving the UKF is jumping see the attached image.
From configuration point of view, we use X/Y and yaw from the reference pose; x,y velocity of the twist from the odometry and omega (rotation around yaw) from the IMU. The process noise configuration is not changed and the default ROS-version. ROS Melodic is used.
Till now (although using the UKF for some time in different projects) we did not encounter this issue.
Any idea what could be wrong to cause this jump?

Update 22.9.2022:
We encountered the same issue again. The system was running for more then 12 hours on this day and after around 4 hours we had a jump, when the robot is standing. Such a jump happened 3 time within the 12 hours but apart from those jumps not problem at all, in the same configuration and environment.
The image shows the values of the input before the jump:

The image shows the values after the jump:

The image shows steadiness for a longer time:


问:
How DH-parameters is obtained for this manipulator?
So I'm trying to find DH parameters for the manipulator as shown in this picture:

I draw coordinate systems for each joint as:

And I got this DH parameters:

Is this solution correct? Am I missing something here?


问:
Question about 4-mecanum wheeled mobile robots
I'm trying to make a mobile robot with 4 mecanum wheels. The method that I've chosen is to fuse the sensors(encoder, imu) with EKF and use the SLAM algorithms(Gmapping, Cartographer, etc..). Right now I'm trying to get an Imu values using rosserial.

My IMU is EBIMU24GV4 9DOF with EBRCV24GV4 wireless receiver. This IMU can output Euler angles, Quaternion as pose data, GYRO, ACCELERO, MAGNETO, DISTANE, TEMPERATURE data. I'm a noob to IMU and I think I didn't fully understand about IMU. Also, I don't know what info I need to get Odometry of my mobile robot.(what info among Euler, Quaternion, GYRO, ACCELERO, MAGNETO, DISTANCE do I need? and Why?)
Pls Somebody help me.

And For my understanding, I have to get the 4 quaternion values by every timestamp using rosserial(std_msgs/String). Next I have to crop the exact data I need(w, x, y, z) and put it to sensor_msgs/Imu.Quaternion.msg to use and visualize in ROS for my mobile robot. Is my understanding corrrect?


问:
What DC motor is fit to replace this AC one?
I've a machine with this motor:

I would like to swap this one with a DC motor in order to have better control, maybe a stepper one so that it could be controlled via an arduino board and a dedicated dc motor driver like this one: https://a.co/d/feRMU1B

What physical specifications should I look for in a DC motor if I want to be able to have similar performances? thanks!


问:
EKF slam loop closure and landmark location updates
I asked a variation of the question before but I never got an answer.

Basically I'm trying to understand how after loop closure the location of prior seen landmarks gets updated and their uncertainty reduced.

I have seen this done in simulations and I want to understand how it works, how are different landmark positions updated with respect to a landmark being seen again?


问:
OpenCV: What does it mean when the number of inliers returned by recoverPose() function is 0?
I've been working on a pose estimation project and one of the steps is finding the pose using the recoverPose function of OpenCV.

int cv::recoverPose(InputArray       E,
                    InputArray       points1,
                    InputArray       points2,
                    InputArray       cameraMatrix,
                    OutputArray      R,
                    OutputArray      t,
                    InputOutputArray mask = noArray()
                   )
```

I have all the required info: essential matrix E, key points in image 1 points1, corresponding key points in image 2 points2, and the cameraMatrix. However, the one thing that still confuses me a lot is the int value (i.e. the number of inliers) returned by the function. As per the documentation:

Recover relative camera rotation and translation from an estimated essential matrix and the corresponding points in two images, using cheirality check. Returns the number of inliers which pass the check.

However, I don't completely understand that yet. I'm concerned with this because, at some point, the yaw angle (calculated using the output rotation matrix R) suddenly jumps by more than 150 degrees. For that particular frame, the number of inliers is 0. So, as per the documentation, no points passed the chirality check. But still, what does it mean exactly? Can that be the reason for the sudden jump in yaw angle? If yes, what are my options to avoid that? As the process is iterative, that one sudden jump affects all the further poses!


问:
Suggest me an IMU which is not affected by magnetic field
I am using IMU for platform stabilization (Stewart Platform). But the issue is that there is a strong changing magnetic field. And I think that it might affect the accuracy of IMUs. Any suggestions?</p>


问:
how to use PyTorch for creating, training and testing machine learning model and then using it at ros2 node for inference and robotic control?
I know, my question is very vague but let me explain it in detail. I am a software engineer and recently learned about ROS2 and its capabilities and want to know about the process of integrating machine learning to the robot. I come to know OpenCV is used for some object detection task but wanted to know more about adding extension to libraries like TensorFlow and Pytorch(particularly).
How can we use pre train model from Pytorch and use in robotic operation via running as ros2 node?
Or, how can we train our pytorch model using ros2 robotic data or Rviz or Gazebo simulator capabilities for training and testing the model?
Example Scenario - making a model for  running Turtlebot autonomously from ground using torchvision (pytorch vision library).
Note: I also searched for Tensorflow Lite on ros2 but all the result pointed to Nvidia jetson and ros, some TensorRT library and some method.
I want to know is it possible to DIY by some framework or ground up.
Thank you</p>


问:
Calculating the depth in a general stereo vision system
When calculating the depth of a pixel using two cameras, most of the literature I have read describes stereo vision with the cameras having parallel optical axis as shown in the picture below. Because of similar triangles, the depth Z can be calculated as

Z = (f * B) / (x_l - x_r)

What if the cameras are rotated as in the following picture? How can I calculate the depth then?


问:
Floppy fish mechanism design
I've bought a floppy fish toy (crab version) for my kid. The toy looks like:

Unfortunately, the toy mechanism inside jams when grabbed and the battery lasts for a short time:

I tried to do my own mechanism, printing own case and using Arduino with servo PowerHD R12 but the servo was heating up :( Is there any possibility to make similar mechanism for toy with not oversizing it? What kind of motor/mechanism would be good for that kind of sweeping toy so it doesn't get hot?

EDIT:
what type of motor/servo would fit for this kind of mechanism? I tried few servos and notices that desired speed would be minimaly 0,06 [s/60sec] and momentum 8 [kg*cm].

Title: Floppy fish mechanism design


问:
Why is the EKF approximated this way?
I'm a student that recently started taking a course on cognitive robotics. The book I use is Probabilistic Robotics by Thrun Burgard and Fox.

In the EKF algorithm, we linearized the action model in the following way

$$g(u_t,\:x_{t-1})\:=\:g(u_t,\:\mu _{t-1})+G_t\cdot (x_{t-1}-\mu \:_{t-1})$$

$g(u_t,\:x_{t-1})$ is the action model and $G_t$ is its Jacobian matrix with respect to the state $x_{t-1}$.

I don't see how this guarantees linearity because $g$ could be nonlinear in $u_t$. The authors don't mention anything about why this is the case.

In other words, I imagined that the multivariate taylor expansion for this where we get a linear function in both $u_t$ and $x_{t-1}$

Title: Why is the EKF approximated this way?


问:
ros2: transform pointcloud2 data from one frame to another in python
I have pointcloud2 data related to my lidar_frame. I would like to transform the data to my base_frame to use them with my ICP Algorithm. I found a sample here: https://answers.ros.org/question/291735/pointcloud2-transform-cpython/ but this example seems to be related to ros1.

Somehow I can not find tf2_sensor_msgs.tf2_sensor_msgs which contains do_transform_cloud

Is there any other sample out there?


问:
What parts are needed to mount a dc motor on lawn mower wheel for direct drive
I am used to working with robot tire kits that come with a wheel, an axle having a hub on one end which mounts onto the wheel hub and the other end which is bored and mounts directly to a motor shaft. There is also usually a screw going through the axle that tightens on the D-shape shaft of the motor. An example kit is the left image below.

What parts would I need to make the same direct drive mechanism work for a lawn mower wheel? Lawn mower wheels usually just have a hub with one through-hole (bushing). If I don't have a cnc machine, what parts would I need to get to securely attach the D-shape shaft of a motor to the hub of the lawn mower wheel? I'm interested in the lawn mower wheels because there are just more options for size. For example, the image below on the right is one set of wheels I want to try to direct drive with a dc motor. Right now my motor shaft is 8mm and the lawn mower wheels have a bushing size of 3/4".


问:
Efficient map representations for path planning using elongated robotic vehicles
I am working on the map representation for an elongated autonomous vehicle, and I am looking into sparse map representations like VoxBlox, OctoMap, VDBFusion etc. I see in the research on path planning that a common thing to do in sampling-based path planners is to check the ESDF/TSDF value of a given voxel for each sampled point, to check for collision. If the distance encoded in the ESDF/TSDF is smaller than some given threshold, a given sampled point is considered to be collision-free. Our challenge is that our safety margin varies in the different dimensions of our vehicle. We might need a distance of 4 meters from the Center-of-rotation of the vehicle to a bridge (in z-direction), whereas we might need 10 meters or more in x- and y direction. So it is not feasible for us to check a single threshold condition. Without overhead structures, this is not a problem; because as we sample the voxels at ground level they will accurately describe the distance to the closest edge. However, if we have an overhead structure like a low bridge, the TSDF/ESDF value of a voxel at ground level might encode the distance to the bridge over head, instead of to the pillars of the bridge on the sides. We might therefore end up with a situation where the vehicle thinks a low bridge is not traversable.

A quick and dirty solution to this is of course to not include in the map all of the voxels above the given threshold in z-direction. That way, all the voxels at ground level will reflect the distances to the pillars of the bridge, and not its over head structure. However, this might reduce the performance of our Lidar Inertial Odometry (LIO) as it has less information to do its job. So we could keep two maps, one complete map that we use for LIO and the other which is truncated at the safety margin in z-direction. However, now we have two map representations that need to be updated and twice the computational requirement.

Does anyone know any research which has dealt with similar challenges? Or are there any ideas as to how this challenge may be overcome?

Thank you


问:
transform IMU reference to robot reference
I have an IMU rigidly attached to the end effector of a robotic arm. The goal is to compare the orientation of the IMU to the orientation of the robot arm. The 9-axis IMU data is used in a sensor fusion algorithm to compute the IMU quaternion. When static, after removing gravity, the linear acceleration magnitude is approximately zero as expected. The static quaternion is converted to a rotation matrix $R_1$. The corresponding robot orientation is calculated using the manufacturer's nominal DH parameters to get the rotation matrix $R_2$. The DH transform computation were validated using the spreadsheet provided by the manufacturer. A mapping $M$ from the IMU reference frame to the robot reference is then estimated as
$$\begin{equation}[U,S,V] = svd(R_2R^T_1)\end{equation}$$
$$M = VU^T$$

Given the following measurements at time index $n$ for the IMU quaternion $q(n)$ and resulting rotation matrix $R_1(n)$
$$q(n)=[0.6888 \ \ 0.1354 \ \ 0.7017 \ \ -0.1218]\rightarrow R_1(n) = \begin{bmatrix} -0.0144&0.3579&0.9336\\\ 0.0222&0.9336&-0.3576\\\ -0.9996&0.0156&-0.0214\end{bmatrix}$$

and the robot orientation $R_2(n)$

$$R_2(n) = \begin{bmatrix} -0.0008&0.0017&1.0000\\\ -1.0000&0.0000&-0.0008\\\ -0.0001&-1.0000&0.0017\end{bmatrix}$$

the resulting transformation is
$$M = \begin{bmatrix} 0.9343&0.0136&-0.3563\\\ -0.3560&-0.0219&-0.9342\\\ -0.0206&0.9997&-0.0156\end{bmatrix}$$

which correctly yields
$$\begin{equation}
R_2(n) \approx M^TR_1(n)
\end{equation}$$

However, moving to the next stationary orientation, where the measurements are
$$q(n+1)=[0.7744\ \ 0.4419 \ \ 0.0104 \ \ -0.4528]\rightarrow R_1(n+1) = \begin{bmatrix}     0.5898&0.7104&-0.3841\\\ -0.6920&0.1995&-0.6938\\\ -0.4162&0.6750&0.6092\end{bmatrix}$$

$$R_2(n+1)=\begin{bmatrix}-0.5830&0.8093&-0.0722\\\ -0.4532&-0.3976&-0.7978\\\ -0.6744&-0.4324&0.5986 \end{bmatrix}$$

the transform $M$ is no longer valid and

$$R_2(n+1) \neq M^TR_1(n+1)$$

I assumed the initial rotation transformation would be applicable to all orientations since the IMU is rigidly attached to the end effector, but clearly this is not the case. How should the IMU orientation be properly transformed into the robot reference frame?


问:
Differentiating correspondences in ICP objective function?
The Iterative Closest Point (ICP) algorithm usually alternates between two steps:

Point correspondence finding

Nonlinear least squares optimization of ICP objective function given those correspondences

In case of depth map alignment, it was found that using projective correspondences instead of nearest neighbours led to better results. If my understanding is correct, then projective correspondences are differentiable, so it should be possible to include projective correspondence search into the ICP objective function.

Let's compare the conventional point-to-plane formulation $E$ with differentiable correspondence search in $\hat E$.

The objective function of point-to-plane ICP (with fixed correspondences):

$$E(R, t) = \sum_i \left(\left(R p_i +t - q_i \right) \cdot n_i\right)^2$$

The objective function of point-to-plane ICP (with correspondence search in objective function):

$$\hat E(R, t) = \sum_i \left(\left(R p_i + t - Q\left(\pi(R p_i + t)\right) \right) \cdot N( \pi(R p_i + t))\right)^2$$

where:

$p_i \in \mathbb{R}^3$ is a point of the source point cloud

$q_i \in \mathbb{R}^3$ is the point of the target point cloud corresponding to $p_i$

$n \in \mathbb{R}^3$ is the normal of $q_i$

$Q \in \mathbb{R}^{M \times N \times 3}$ is $M \times N$ vertex map constructed by un-projecting the target depth map

$N \in \mathbb{R}^{M \times N \times 3}$ is $M \times N$ normal map corresponding to $Q$

$\pi\colon \mathbb{R}^3 \mapsto \mathbb{R}^2$ is the projection function from world space to image plane

As can be seen, the fixed target's vertex and normal correspondences were replaced by queries into the 2D vertex and normal maps.

Has this approach, where a similar formulation of the objective function $\hat E$ was used, been tested before (are there any papers)? If it has, then what are the pros and cons of including projective correspondence search into the ICP objective function? Does it improve convergence? Does $\hat E$ help find better correspondences in later iteration steps than $E$?


问:
error with Breezyslam (Descriptor length mismatch)
so I was working on a slam project and using the Breezyslam repo link, I am always getting this error, I don't know where I am getting it wrong, can someone help?

```<code>File "/home/robopi/Slam/py_slam/lib/python3.9/site-packages/rplidar.py", line 214, in _read_descriptor

raise RPLidarException('Descriptor length mismatch')

rplidar.RPLidarException: Descriptor length mismatch
</code>```

I am running the examples from breezyslam - rpslam.py

I am using raspberry pi 4 and rplidar A1

i have tried another repo which uses breezyslam then i am getting this error

```<code>File "/home/robopi/Slam/py_slam/lib/python3.9/site-packages/adafruit_rplidar.py", line 280, in _read_response
    raise RPLidarException("Wrong body size")
adafruit_rplidar.RPLidarException: Wrong body size
</code>```

that repo is link

i am just trying to build a slam using python


问:
IMU to Camera transformation
Suppose you are implementing SLAM or VIO system, you have your camera C and IMU and a coordinate transformation between them (R, T).

How do convert IMU measurements to camera accelerations and rotations? Or vice versa? The papers I have read all assume the IMU is located at the focal point of the camera which is obviously not true.

Title: IMU to Camera transformation


问:
Having trouble assigning x-axis to calcualte DH table
I'm trying to do a DH table but I'm having trouble determining thedirection of the x-axis in the following figure.


问:
Publishing transform with rosserial using TF/Odom + display in RVIZ?
I'm trying to model a simple helicopter transform with a spinning rotor in RVIZ. I would prefer it to be timestamped into a single topic.

I've been working through the Odom and TimeTF examples in rosserial. I have a base_link that I would like to remain fixed in position but rotate on XYZ with data from an IMU (as the body of a helicopter in flight would behave).

I then have an odom that is translated a fixed, Z distance away that I would like to rotate about Z only, and be fixed to the rotation of base_link (as the spinning rotor on a helicopter would behave).

I have all the arduino code for the IMU and rotation/encoder done. I just can't seem to figure out how to do the above ROS part. The farthest I can get is to have a fixed base_link, + odom transform translated some distance from the body of the helicopter and have the rotor spin using a yaw quaternion (that takes angle position data from my encoder).

Questions:

Is there a way to make the base link rotate about 3 values from my IMU (x,y,z)?

While simultaneously having the translated odom transform spinning?

Further, the above would constitute 4 different readings: (1) accel x, (2) accel y, (3) accel z, encoder position angle.

Can I also publish these all as individual values to a single topic?

Can I also publish an infinite amount of other values to this same topic as well under subheadings? Like temperature, gyro x, y, z, etc.?

I've included my arduino ros code progress below. Any help would be immensely appreciated!
Thank you.

```<code>    // libraries
    #include <ros.h>
    #include <ros/time.h>
    #include <tf/transform_broadcaster.h>
    #include <tf/tf.h>

    ros::NodeHandle nh;

    // ros publisher instantiation for Odom & TF
    geometry_msgs::TransformStamped t;
    tf::TransformBroadcaster broadcaster;

    // ros chars
    char base_link[] = "/base_link";
    char rotor_odom[] = "/rotor_odom";

    float encoderAngle;

    void setup() {

       nh.initNode(); // ros node setup
       broadcaster.init(nh); // Odom & transform

    }

    void rosLoop() {

        // tf odom->base_link:

          t.header.frame_id = base_link;
          t.child_frame_id = rotor_odom;

          t.transform.translation.x = 0;
          t.transform.translation.y = 0;
          t.transform.translation.z = 2;

          t.transform.rotation = tf::createQuaternionFromYaw(encoderAngle*3.141592/180);
          t.transform.rotation.x = 0.0;
          t.transform.rotation.y = 0.0;

          broadcaster.sendTransform(t);
          t.header.stamp = nh.now();

        // spinOnce
          nh.spinOnce();

        }
</code>```


问:
Meaning of p(q) in the expression for minimum clearance from obstacle for redundant robotic manipulators
Can somebody who has studied Industrial manipulators or has worked on Industrial manipulators using Jacobian Inverse and Jacobian Pseudo inverse algorithm for Inverse Kinematics please explain what does p(q) stand for in the following expression. This is used to maximize the minimum clearance from an obstacle for a redundant robotic manipulator, thank you.


问:
Confused in Regards to Sensor Models, Laser Scans and Ray Castings
I have started studying Robotics recently from Probabilistic Robotics by Thrun Burgard and Fox.

Our objective in the sensor model is to compute
$$P(Z_t|X_t)$$

But for this we need to know $z_{exp}$ (mean of the Gaussian that $Z_t$ follows) for the particular pose $X_t=(x_t, y_t,\theta_t)$. The book mentions that we will use "ray casting" for that. My understanding is that this means to go to the map, shoot a ray from $(x_t,y_t)$ along $\theta_t$ and see at what distance it hits an object in the map.

1 - Is my understanding correct?

2 - If it is, then how can this be related to the real situation where a laser scanner is used? As far as I understand, at each $X_t=(x_t, y_t,\theta_t)$ a laser range scanner will shoot many beams at many different angles. This doesn't make sense because it will obviously hit many different objects and it makes $\theta_t$ meaningless (imagine that it shoots beams at all angles around it). That is, using $z_{exp}$ that we got from ray casting at this pose wouldn't make much sense since our rays hit more objects than the intended one.

It's either that I'm getting something wrong here or there is a clear conflict between ray casting and what happens in real life. Sadly, I have reread the relevant parts of the book multiple times and couldn't resolve the issue.

Thanks.


问:
Sampling in non-parametric distribtution
I am currently working on a package in C++ to easily implement different Statistical Filters, and after implementing various versions of the Kalman Filter I decided to start working on the Particle Filter. For that, I have been using some of the resources available online, such as the Probabilistic Robotics book or the Cyril Stachniss online lectures on YouTube. The first rock I encountered consisted of sampling in non-parametric probability distributions. When implementing the Sampling procedure from the Particle filter Chapter 4 from the book I don't exactly see how it can be done, and the explanation doesn't clarify it to me completely. What this says is:

Line 4 generates a hypothetical state xt for time t based on the particle xt−1
and the control ut . The resulting sample is indexed by m, indicating that it is
generated from the m-th particle in Xt−1 . This step involves sampling from the
next state distribution p(xt | ut , xt−1 ). To implement this step, one needs to
be able to sample from p(xt | ut , xt−1 ). The ability to sample from the state
transition probability is not given for arbitrary distributions p(xt | ut , xt−1 ).
However, many major distributions in this book possess efficient algorithms for
generating samples. The set of particles resulting from iterating Step 4 M times
is the filter’s representation of bel(xt ).

How can we sample from p(xt|ut,xt−1)? Do I need to apply the input from the previous state to the current one and maybe add some noise? Does anyone know any source I can look for on sampling in non-parametric distributions? I am especially struggling with how would we obtain the likelihood of a given point if we only know the weights of the particles and their weights, which is just a discrete set of points. How can we obtain a continuous distribution for the probability?

I checked this other question in which they mention forwarding the input with the dynamic model of the system, but I am not totally convinced by the explanation given.

Edit: I am starting to think that it might not be possible to fit a general Particle Filter code, where only inputs and/or pointers to external functions are needed for every case, but better to have some of the functions that can be used for resampling and other operations, but not the filter as a whole. Especially taking into consideration the step in which we need to find the probability of the current measure given the state of each of the particles. How can the comparison be even implemented?


问:
Adapt D shaft to double-flat hole
I need to find a way to couple the D shaft of a gearmotor to the double-flat hole of a wheel.
The model of the motor is this one.
And the wheels are these ones.

The diameter of the D shaft of the gearmotor is 3 mm, and the diameter of the double-flat hole is 5.4 mm.

Is there a way to couple the shaft of the motor to the wheel? I found double-flat collars but they are too big for the shaft and the hole: These ones, and these ones.

I'm not using one of those yellow gearmotors because I need more torque. I'm trying to make a sumobot for a school competition; I found on the internet those yellow gearmotors with gear ratios of 1:120, but they are not available in my local stores, the motor that I showed in the link is one that I can get from a local store (Steren), but those yellow wheels are what I can find in local stores (such as Steren, and yeah, they sell those wheels, but they also sell motors that are not compatible with those wheels), there are not other wheel models that can fit a D shaft in their hole.

What can I do? My last resource is just to use the yellow gearmotors or to make wheels made out of wood with sandpaper on them for traction. I'm not risking it buying stuff online, because I don't know how much it will take shipping them to my country.

Title: Adapt D shaft to double-flat hole


问:
How to find coefficient of friction that will maximize torque?
When using DC motors with a drive wheel (aka "direct drive") to propel a vehicle (e.g. an RC car), force and torque play a role in how efficiently that motor's power is transferred into motion via the drive wheel in contact with the surface of travel.  Here's one resource on force and torque when it comes to motors.

However, the coefficient of friction between the two surfaces will also affect how efficiently that power is translated into motion.  My specific question is: what are the equations that govern optimizing drive wheel coefficient of friction to the surface of travel's coefficient of friction in order to realize a given motor's maximum RPM while in motion traveling that surface?  In other words, how does one calculate the optimal coefficient of friction to achieve the maximum (rpm/motion) out of the motor?

To use some hyperbole, a given motor with drive wheel on an icy surface will be lossy, as will the same combination on a sticky or overly gritty surface.  So somewhere in-between will be optimal for maximum power transfer (and therefore, maximum speed) between the drive wheel and the surface of travel.  So how does one calculate that optimal coefficient of friction?


问:
Yaskawa Comm Error
I have several DX100 & YRC1000 units on our plant network. Two of the units intermittently fault out with a comm error 1301. One is a DX100, the other is a YRC1000. The only way to clear the error is to cycle power on the controller. Any ideas on what could be the cause of this error?

Thanks

Title: Yaskawa Comm Error


问:
RGBD based human detection on a merged pointcloud
I am trying to use RGBD based people detection on a pointcloud merged from two individual real sense d415 cameras mounted vertically, image below.

The merge is performed by transforming the individual pointclouds to the base_link (centre of the robot) and adding them using PCL + operator. The resultant pointcloud is as below.

As prerequisite for the people detection, a ground plane needs to be estimated, but as it is seen in the pointcloud, due to the mounting positions o f the cameras not a lot of ground can be seen. As a temporary solution, we have added an artificial ground plane (a pointcloud matching what would have been the actual ground plane) as seen below.

The person detection algorithm works through detection of people in RGB images obtained from the pointcloud data. Upon passing the ground planes obtained from the artificial plane and the merged pointcloud, the algorithm seems to run fine (By that I mean there are necessary variables being calculated) but there are no detections.

The same setup seems to work if the cameras are positioned horizontally, without the angle orientation and since a lot of the ground is visible then, we don't have to pass the artificial ground plane. The system also seems to work with one camera mounted vertically.

I am wondering if this could be an issue with the camera intrinsic matrix we are passing that is needed for the PCL people detection algorithm, as it does not really match with the merged pointcloud we are providing as an input for the detection.Has anyone tried something similar before in the sense, passing a merged pointcloud to people detection?

Since I'm not an PCL expert and don't have an in-depth understanding of I'm unable to understand the problem here. Perhaps it could be a a very benign oversight from our end? Please feel free to ask questions to gain a better understanding of the situation and guide us in the right direction.

A flowchart of the pipeline

Thanks

UPDATE:
Wanted to provide a small update in case anyone is interested.
The algorithm is able to determine clusters, but the issue is that I get a lot of false detection and people being detected are not consistent as well. If anyone is interested, I can provide more data and the pcd files as well, if needed, for analysis.


问:
v_s quantity in twists
In Modern Robotics v2, we have the following figures:

I don't understand why in Eq. 3.73, we have the given expression for $v_s$. My thinking is:

The position $p$ is the position of the frame $b$ with respect to fixed frame $s$.

$\omega_s$ is supposed to be the angular velocity of $b$ wrt $s$. But how can $-p$ represent  a "point on body [b] currently at the fixed-frame origin"? If $p$ is $p_{sb}$, then isn't $-p = p_{bs}$? Since if you sum $p_{sb}$ and $p_{bs}$ don't you get the $0$ vector, which means the linear velocity $v_s$ is 0?

Title: v_s quantity in twists


问:
Pi Pico - HC05 AT commands don't work
I am trying to set up a Bluetooth communication between two pi pico devices using HC05s. I am trying to make the two HC05s connect and I read that you need to set up Master/Slave configurations using AT commands. I currently have only connected one HC05 to pico and that HC05 is blinking once every two seconds (How it's supposed to for AT commands I believe). TX is connected to GP1 and RX to GP0.

I also tried running the code with 9600 and 38400 baud rates. None seem to work. When I type AT I expected to see the following output:
AT
reading data
'AT' response: OK

But I only received AT

Here is the code that I am using (From the internet):

```<code>from machine import UART, Pin
from time import sleep

import uos

id = 0
rx = Pin(1)
tx = Pin(0)
baudrate=38400 # default is 9600

uart = UART(0,baudrate=baudrate, tx=tx, rx=rx)

print("PicoTerm")
print(uos.uname())
print("type 'quit' to exit, or help for commands")

command = "AT"
while True and command !='quit':

    command = input("PicoTerm>")

    if command != 'quit':
        uart.write(command)
        print(command)
        sleep(0.1)
        response = bytes()

        if uart.any() > 0:
            response = uart.readline()
            print("reading data")
            print(response)
            print("check")
        # output = "".join(["'",str(command),"'","response:",str(response.decode('utf-8'))])
        try:
            print(str(response.decode('utf-8')))
        except:
            print("weird response")

    elif command == 'quit':
        print("-"*50)
        print('Bye.')
</code>```

The output that I get is this:

```<code>PicoTerm
(sysname='rp2', nodename='rp2', release='1.19.1', version='v1.19.1 on 2022-06-18 (GNU 11.2.0 MinSizeRel)', machine='Raspberry Pi Pico with RP2040')
type 'quit' to exit, or help for commands
PicoTerm>AT
</code>```

and the output after my input is just whatever I say back.
AT

Title: Pi Pico - HC05 AT commands don't work


问:
Ideas on how to create kinematic model of skid-steered rocker bogie mobile robot
I'm trying to derive the inverse kinematics of a skid-steered mobile robot with rocker-bogie mechanism.

I learned how to derive the kinematics via transformation matrices as per "Kinematic modeling of wheeled mobile robots" by Muir and Neumann.

I also read several papers (link1, link2, link3, link4) doing the kinematic modeling of rocker-bogie robots, but all of them has active steering, so they don't need the differential drive equations.

But the problem with the method in "Kinematic modeling of wheeled mobile robots" is that it does not capture the ICC (instantaneous center of curvature) method for differential drive (or skid-steering for more than 2 drive wheels).

In deriving the forward kinematics (as per Muir and Neumann), you will get robot velocities in terms of joint variables (including wheel rotational velocities), which can will lead to deriving the robot's Jacobian WRT wheel contact frame.

But I have no idea on how to somehow plug in the differential drive equations in there.

Any ideas on how to do this?


问:
Simulating Velodyne Puck Lite
I am trying to simulate a Velodyne puck Lite on Gazebo Garden but I am not sure how to go about the rotation speed of the lidar.
Does adjusting the update rate and making the angle of the rays of the sensor 360  account for the actual speed of rotation of the lidar? Or should add a rotating link somehow and try to simulate the rotation of the sensor ?

This is important to me because I'm trying to test how fast can the lidar can go while still detecting the artifacts in the environment.

Title: Simulating Velodyne Puck Lite


问:
Checking for collision with octomap
I watched the octomap presentation from RosCon2013 and understood that implementing something like:

```<code>void ExtractOctreeFilter::operator()(PointCloudType& pc)
{
  PointCloudType out;
  out.header = pc.header;
  for (const auto& p: pc.points)
  {
    octomap::OcTreeNode* node;
    node = octree_.search(p.x, p.y, p.z);
    if (node)
    {
      out.points.push_back(p);
    }
  }
  pc = out;
}
</code>```

Is not a good way to check for collisions as I would run through the entire tree every time I need to check if a point belongs to the tree.

This is an algorithm that I want to use for collision detection. Is there any better way to check for points inside an octree?

Title: Checking for collision with octomap


问:
Synchronize GPS orientation with cameras
I'm interested in using GPS system to generate ground truth for evaluation of some SLAM systems I am testing.

I'm confused on how I can initialize the location and orientation of the GPS unit to be consistent with the other sensor systems?

How does the kitti dataset do it? If the starting orientation is just a little off the maps will diverge drastically. How do the existing datasets do it?


问:
Control of ports being bound on ROS nodes
I am using ROS Foxy and have quite a lot of nodes in my setup.  We finally hit the point recently where a port bound by a node was a port some other device wanted to use.  I've looked at the documentation for how ROS domain IDs work in port choosing and whatnot, and seem to get how the discovery ports work.  We are using the spdp setting in our CycloneDDS profile but no other special settings.  Our ROS_DOMAIN_ID is set to 67.  The quick example:

```<code>ros2 topic pub -r 1 /test std_msgs/msg/String "data: hello"
</code>```

I let that run, discovered the process ID, then used that to check which ports that process is listening on with:

```<code>sudo netstat -tulpn|grep 855988
</code>```

The output I get is:

```<code>udp        0      0 0.0.0.0:24150           0.0.0.0:*                           855988/python3
udp        0      0 0.0.0.0:24151           0.0.0.0:*                           855988/python3
udp        0      0 192.168.10.215:41391    0.0.0.0:*                           855988/python3
udp        0      0 0.0.0.0:42877           0.0.0.0:*                           855988/python3
</code>```

The first two ports make sense, and jive with the calculator from the documenation for the multicast discovery ports.  The other two ports are what I don't understand at all and seem totally arbitrary.  I assume they have something to do with data transfer but I don't see any documentation for that.  For the sake of sane expectations of port usage and available ports for other applications, is there some way to determine:

What these ports are actually listening for?

A way to control which ports are actually used for these, if needed?

I have been through the CycloneDDS Profile Options and even tried a few with no effects.


问:
How to calculate the dimensions of a McKibben actuator based on the force you want it to apply?
I intend on design and build a McKibben hydraulic muscle that can lift 5 tons by itself, it won't be attached to a human or anything like that.

I tried to search for methods to calculate the amount of force and pressures required for this type of soft actuator, but it seems these equations are too complex for me, because I couldn't get results besides error messages on the calculators.

I have the intention to build it with the following specifications:

The amount of pressure inside the artificial muscles will range from
0.4 MPa to 1 MPa.

The length I intend to make it 30 cm long, I do not know which will
be the actuated length.

I do not know the diameter/radius, nor the actuated diameter and
radius.

The inner bladder and the outer expandable sleeve are meant to be
made of Aramid fabric and fibers.

Both connections in both ends of the soft actuator are meant to be
made out of steel.

The hydraulic fluid will be conventional hydraulic oil with a density
of 0.9 g/ml.

I tried the equations on this article on researchgate, but I only got negative numbers.

Example:

((π(4.97))²(100 ÷ 4 (sin(45))²))(3(1 - 0.11 ÷ 24)² cos(45)²2 - 1)

-4412.77987695

I got some people saying (in other websites) that I should use the "FPA triangle equation" (the F = P x A or P = F ÷ A), but that are meant for solid hydraulic cylinders. I don't think it would apply for McKibben cylinders, though.

Basically, depending on what number you want to find (Force, Pressure or Area), you can use the equation "F = P x A" or "A = F ÷ P".

The problem is that it is a equation meant for hydraulic solid cylinders, not membrane actuators.

But I tried to use the area of the entire membrane, so I can somewhat calculate the force it will apply.

Accordingly to this cylinder area calculator, if I have a cylinder with 10cm radius and 30cm long, I will have a total area of 2513 cm2 (389.6 in²) applying 60 PSI (0,4 MPa), so I would have a force of 23340 pounds (10586,846 kg).

If it was 5cm radius 30cm length, I would have 1099cm² (170.3 in²).

F = P x A

10200 pounds (4626,6422 kg).

This is the force applied to the area, but the area is the membrane, right? How to translate it to lifting force?


问:
How does the lightsensor values work? Lightsensorvalue into Percentage
In Webots: I try to build a Braitenberg vehicle so that when it receives light information through the ligh sensors it drives either away or towards the light. I used an ePuck and tried to just connect the light sensors 0 and 7 to the left and right wheel. I placed a little light bulb with white light in front of it and disabled the scene lighting, so the light bulb is the only light source. The values from the light sensor readouts are always around 4100.

Now to my question: What is the maximum number the light sensor can measure? So I can connect the wheels to the sensor input and say it's fully exited, drive with max speed. When it is less excited, drive with less speed. What is the formula to convert light sensor values to percentage?


问:
Gazebo Garden plugin and nested models?
I have a problem that I'm not able to solve with Gazebo Garden.

I wrote a System plugin that handles a stereo camera, I need a plugin to interface the simulator with our SDK.

Differently from Gazebo Classic in Gazebo there is not a Multi Camera sensor, so I must associate the plugin to a model containing the two sensors instead of associating it to a single sensor.

This works correctly, but I have not found a way to add multiple simulated stereo cameras to the same robot model because I do not know how to associate each plugin to the correct sensors pair.

In SDF I could create nested models and I guess this can solve my issue, but how can I achieve the same when describing the robot with URDF in ROS2?

I'm going crazy trying to find a working solution :(

Title: Gazebo Garden plugin and nested models?


问:
velodyne LiDAR, which driver or lib give the timestamp of each point?
I am looking for a VLP-16 driver lib or code that gives a point time stamp instead of per scan time stamp.

I know their official manual show how to calculate the timestamp of each point but I was wondering if there are ready-to-use drive that provides the timestamp of each point.

ROS driver gives the time stamp of each scan.


问:
Controlling a system in a particular direction
In Discrete-time Control Engineering by Katsuhiko Ogata, it is stated that "A necessary and sufficient condition for complete state controllability is that
no cancellation occurs in the pulse transfer function. If cancellation occurs, the system
cannot be controlled in the direction of the cancelled mode."

Actually, what does controlling in a direction mean?


问:
Nonlinear continuous system function of IMU sensor fusion robot
For my robotics course I have to implement the nonlinear continuous system function for a mobile robot that is equipped with a GPS receiver and an IMU consisting of an accelerometer and a gyroscope. For the prediction step with an EKF, I need to implement the kinematic model $\dot x = f(x,u)$ with given state vector $x = \begin{pmatrix}x\\y\\z\\v_x\\v_y\\v_z\\q_1\\q_2\\q_3\\q_4\end{pmatrix}$, input vector $u = \begin{pmatrix}a_x\\a_y\\a_z\\w_x\\w_y\\w_z\end{pmatrix}$, time $t$ and gravity $g$.

Afterwards, I need to calculate the matrix $A=\frac{\partial f}{\partial x} $ and $B=\frac{\partial f}{\partial u} $ where $A \in \mathbb{R}^{10x10}$ and $B \in \mathbb{R}^{10x6}$. These are used to calculate the system matrices $F$ and $H$ of the time discrete system (this is already given as Matlab code).

Unfortunately I didn't attend any control theory courses yet and it is my first semester in robotics, so I am pretty lost with this task. Maybe someone could give me a hint on how I have to approach this problem.


问:
How is the motion calculated in freeform 3D tube bending?
I have seen 3D freeform tube bending in videos such as this, this, and this.  I would like to ask how the motion of the bending orifice is calculated?  Does it involve Jacobian?</p>


问:
Hexapod Project Specifications - Power and Servos
So I will get straight to the point. I wanted to get ambitious with my robot project while trying to keep the budget minimum. I have browsed through several posts regarding power sources and servos, and most of them keep me juggling my choices.

Choice for servos:

I noticed how convenient MG996R is for my intended purpose, but I also realise that it adds to weight of the robot (18 motors is around 990 grams). Hence I'd need more power for these bad boys. Another option I observed was using MG90 micro servos, but the overal torque of these motors are far too small compared to MG996R. I am really confused as to whether I should choose MG90 for light-weightedness (240 grams for motors) or should I go for MG996R for higher torque while getting higher weight.

I don't know which among these two are more accurate either. Would it be mg90? or MG996R? I currently have sg90 from my previous project of 4-legged robot, but I recall how poorly accurate they were and also they were easy to break due to plastic gears.

Since I am making a hexapod, I wish to have proper accuracy, but once again I can't spend 30 dollars for each hitech servos with high torque, I wish to keep the budget low as possible. MG996R itself is quite high for my budget.

Choice for Power:

I also wish to understand how to choose my power source. One group of people suggest 18650 power source, but they'd provide 3.7V alone, and 7.4V if put in series. One post mentioned if we were to use single cell, we'd need a boost convertor, and buck for the other case. I wish to know how do these choices effect overall current output.

Some suggest to get NiMH batteries as they are perfect at 6V for the servos, but I wonder about their total current discharge seeing as how the motors require at most 15A or 18A.

Conclusion

I wish to see some successful choices of the above components, or maybe better equivalent components. Some people say MG996R was a failure for these hexapod projects, and it scares me to take up this project for this reason. Help me get an insight as to how I can choose an ideal servo motor and the ideal power source with appropriate circuits that support the distribution of power.