hippo5329 / linorobot2_hardware

A fork of the linorobot/linorobot2_hardware project which builds motor controller firmware for teensy, esp32 and pico to control mobile robots based on micro-ROS with various sensors support.
Apache License 2.0
17 stars 13 forks source link

Waiting for robot_description to be published on robot_description topic #15

Open Leesanhang opened 4 months ago

Leesanhang commented 4 months ago

Hi there, I am currently doing my project on ROS2. Here are some of the hardware I am using: Mecanum base, esp32-WROOM-32 microcontroller, Cytron MDD10A (Generic 1) motor drivers, A2M8 RPLidar, and a raspberry Pi 4B as the main computer.

I have followed the steps in this page exactly up until the "test_acc" part. One small issue that I did encounter was "test_sensors" part. The values are not changing even when I tilt my robot and so on. (But i guess its fine since the Gyro isn't that important for my project).

The main issue that I've been facing for the past 2 weeks was this: when I run: ros2 launch linorobot2_bringup bringup.launch.py or ros2 launch linorobot2_bringup bringup.launch.py base_serial_port:=/dev/ttyUSB0 lidar_serial_port:=/dev/ttyUSB1 micro_ros_baudrate:=921600

it gives me this in the terminal: WhatsApp Image 2024-05-22 at 15 35 47_3e9edf6d

it just waits infinitely for the robot_description to be published on the robot_description topic.

If it helps, this is my urdf file for my robot:

<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">
  <xacro:property name="base_length" value="0.49" />
  <xacro:property name="base_width" value="0.39" />
  <xacro:property name="base_height" value="0.06" />

  <xacro:property name="wheel_radius" value="0.0723" />
  <xacro:property name="wheel_width" value="0.05" />

  <xacro:property name="laser_pose">
    <origin xyz="-0.0475 0 0.125" rpy="0 0 0"/>
  </xacro:property>

  <material name="grey">
        <color rgba="0.5 0.5 0.5 1" />
    </material>

    <material name="blue">
        <color rgba="0 0 0.5 1" />
    </material>

    <material name="pink">
        <color rgba="1 0.75 0.8 1" />
    </material>

    <!-- base_footprint (projection of base_link on the ground) -->

    <link name="base_footprint"/>

    <joint name="base_joint" type="fixed">
        <parent link="base_footprint"/>
        <child link="base_link"/>
        <origin xyz="0 0 0.2" rpy="0 0 0"/>
    </joint>

    <!-- base_link and base_scan (required for Nav2) -->

    <link name="base_link">
        <visual>
            <geometry>
                <box size="${base_length} ${base_width} ${base_height}" />
            </geometry>
            <origin xyz="0 0 0" rpy="0 0 0" />
            <material name="blue" />
        </visual>
    </link>

    <joint name="base_scan_joint" type="fixed">
        <parent link="base_link"/>
        <child link="base_scan"/>
        <origin xyz="0 0 0.06" rpy="0 0 0"/>
    </joint>

    <link name="base_scan">
        <visual>
            <geometry>
                <cylinder radius="0.0375" length="0.04"/>
            </geometry>
            <origin xyz="0 0 0.04" rpy="0 0 0" />
            <material name="pink" />
        </visual>
    </link>

    <!-- Wheels (4 mecanum wheels) -->

    <joint name="base_left_back_wheel_joint" type="continuous">
        <parent link="base_link"/>
        <child link="left_back_wheel"/>
        <origin xyz="-0.22 0.225 -0.01" rpy="0 0 0"/>
        <axis xyz="0 1 0"/>
    </joint>

    <link name="left_back_wheel">
        <visual>
            <geometry>
                <cylinder radius="${wheel_radius}" length="${wheel_width}"/>
            </geometry>
            <origin xyz="0 0 0" rpy="1.57 0 0" />
            <material name="grey" />
        </visual>
    </link>

    <joint name="base_right_back_wheel_joint" type="continuous">
        <parent link="base_link"/>
        <child link="right_back_wheel"/>
        <origin xyz="-0.22 -0.225 -0.01" rpy="0 0 0"/>
        <axis xyz="0 1 0"/>
    </joint>

    <link name="right_back_wheel">
        <visual>
            <geometry>
                <cylinder radius="0.05" length="0.0723"/>
            </geometry>
            <origin xyz="0 0 0" rpy="1.57 0 0" />
            <material name="grey" />
        </visual>
    </link>

    <joint name="base_left_front_wheel_joint" type="continuous">
        <parent link="base_link"/>
        <child link="left_front_wheel"/>
        <origin xyz="0.22 0.225 -0.01" rpy="0 0 0"/>
        <axis xyz="0 1 0"/>
    </joint>

    <link name="left_front_wheel">
        <visual>
            <geometry>
                <cylinder radius="0.05" length="0.0723"/>
            </geometry>
            <origin xyz="0 0 0" rpy="1.57 0 0" />
            <material name="grey" />
        </visual>
    </link>

    <joint name="base_right_front_wheel_joint" type="continuous">
        <parent link="base_link"/>
        <child link="right_front_wheel"/>
        <origin xyz="0.22 -0.225 -0.01" rpy="0 0 0"/>
        <axis xyz="0 1 0"/>
    </joint>

    <link name="right_front_wheel">
        <visual>
            <geometry>
                <cylinder radius="0.05" length="0.0723"/>
            </geometry>
            <origin xyz="0 0 0" rpy="1.57 0 0" />
            <material name="grey" />
        </visual>
    </link>

</robot>

Any help to solve this issue is much appreciated, Thank youu!

Leesanhang commented 3 months ago

The Vin and GND means the main 24V power right? not the signals?

Leesanhang commented 3 months ago

Oh I'm not too sure about the wire AWG then. Maybe the seller labelled it wrongly. But anyways, I did confirm that it can support way over the motor rating.

hippo5329 commented 3 months ago

Yes, the Vin and GND means the main 24V power. Add the cap on the motor controller board.

Leesanhang commented 3 months ago

Okok, got it. Just wanted to clarify it. Thanks, I'll try it.

Leesanhang commented 3 months ago

The problem was the polarity.

However, I am facing a micro-ROS issue now and I'm hoping to get some guidance on this. This is when I run the robot bringup command.

leesanhang@Pi4B:~$ ros2 launch linorobot2_bringup bringup.launch.py     base_serial_port:=/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2:1.0-port0     lidar_serial_port:=/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3:1.0-port0
[INFO] [launch]: All log files can be found below /home/leesanhang/.ros/log/2024-05-31-05-35-05-279499-Pi4B-4745
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ekf_node-1]: process started with pid [4813]
[INFO] [micro_ros_agent-2]: process started with pid [4815]
[INFO] [joint_state_publisher-3]: process started with pid [4817]
[INFO] [robot_state_publisher-4]: process started with pid [4820]
[INFO] [sllidar_node-5]: process started with pid [4827]
[micro_ros_agent-2] [1717104913.972887] info     | TermiosAgentLinux.cpp | init                     | running...             | fd: 3
[micro_ros_agent-2] [1717104913.973905] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4
[micro_ros_agent-2] [1717104914.182600] info     | Root.cpp           | create_client            | create                 | client_key: 0x604407F2, session_id: 0x81
[micro_ros_agent-2] [1717104914.182787] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0x604407F2, address: 0
[robot_state_publisher-4] [INFO] [1717104914.457506579] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-4] [INFO] [1717104914.457979727] [robot_state_publisher]: got segment base_link
[robot_state_publisher-4] [INFO] [1717104914.458082561] [robot_state_publisher]: got segment camera_depth_link
[robot_state_publisher-4] [INFO] [1717104914.458122487] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-4] [INFO] [1717104914.458151116] [robot_state_publisher]: got segment front_left_wheel_link
[robot_state_publisher-4] [INFO] [1717104914.458178802] [robot_state_publisher]: got segment front_right_wheel_link
[robot_state_publisher-4] [INFO] [1717104914.458307857] [robot_state_publisher]: got segment imu_link
[robot_state_publisher-4] [INFO] [1717104914.458351857] [robot_state_publisher]: got segment laser
[robot_state_publisher-4] [INFO] [1717104914.458382746] [robot_state_publisher]: got segment rear_left_wheel_link
[robot_state_publisher-4] [INFO] [1717104914.458412209] [robot_state_publisher]: got segment rear_right_wheel_link
[micro_ros_agent-2] [1717104914.466890] info     | ProxyClient.cpp    | create_participant       | participant created    | client_key: 0x604407F2, participant_id: 0x000(1)
[micro_ros_agent-2] [1717104914.498531] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x604407F2, topic_id: 0x000(2), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104914.514749] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x604407F2, publisher_id: 0x000(3), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104914.530972] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x604407F2, datawriter_id: 0x000(5), publisher_id: 0x000(3)
[sllidar_node-5] [INFO] [1717104914.541342727] [sllidar_node]: SLLidar running on ROS2 package SLLidar.ROS2 SDK Version:1.0.1, SLLIDAR SDK Version:2.1.0
[micro_ros_agent-2] [1717104914.547264] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x604407F2, topic_id: 0x001(2), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104914.558755] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x604407F2, publisher_id: 0x001(3), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104914.566465] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x604407F2, datawriter_id: 0x001(5), publisher_id: 0x001(3)
[micro_ros_agent-2] [1717104914.576680] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x604407F2, topic_id: 0x002(2), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104914.590002] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x604407F2, publisher_id: 0x002(3), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104914.610584] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x604407F2, datawriter_id: 0x002(5), publisher_id: 0x002(3)
[micro_ros_agent-2] [1717104914.615586] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x604407F2, topic_id: 0x003(2), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104914.621520] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x604407F2, subscriber_id: 0x000(4), participant_id: 0x000(1)
[sllidar_node-5] [INFO] [1717104914.625870875] [sllidar_node]: SLLidar S/N: 6BE69A86C0E09CC7A2E09DF7F9343077
[sllidar_node-5] [INFO] [1717104914.626406875] [sllidar_node]: Firmware Ver: 1.25
[sllidar_node-5] [INFO] [1717104914.626509357] [sllidar_node]: Hardware Rev: 5
[sllidar_node-5] [INFO] [1717104914.633722320] [sllidar_node]: SLLidar health status : 0
[sllidar_node-5] [INFO] [1717104914.633914061] [sllidar_node]: SLLidar health status : OK.
[micro_ros_agent-2] [1717104914.674358] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x604407F2, datareader_id: 0x000(6), subscriber_id: 0x000(4)
[sllidar_node-5] [INFO] [1717104914.984629783] [sllidar_node]: current scan mode: Express, sample rate: 4 Khz, max_distance: 12.0 m, scan frequency:10.0 Hz, 
[joint_state_publisher-3] [INFO] [1717104916.308042356] [joint_state_publisher]: Waiting for robot_description to be published on the robot_description topic...
[micro_ros_agent-2] [1717104930.907725] info     | Root.cpp           | delete_client            | delete                 | client_key: 0x604407F2
[micro_ros_agent-2] [1717104930.909726] info     | SessionManager.hpp | destroy_session          | session closed         | client_key: 0x604407F2, address: 0
[micro_ros_agent-2] [1717104930.938645] info     | Root.cpp           | create_client            | create                 | client_key: 0x57A4A9FF, session_id: 0x81
[micro_ros_agent-2] [1717104930.938714] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0x57A4A9FF, address: 0
[micro_ros_agent-2] [1717104931.010435] info     | ProxyClient.cpp    | create_participant       | participant created    | client_key: 0x57A4A9FF, participant_id: 0x000(1)
[micro_ros_agent-2] [1717104931.015549] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x57A4A9FF, topic_id: 0x000(2), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104931.019623] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x57A4A9FF, publisher_id: 0x000(3), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104931.026763] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x57A4A9FF, datawriter_id: 0x000(5), publisher_id: 0x000(3)
[micro_ros_agent-2] [1717104931.031753] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x57A4A9FF, topic_id: 0x001(2), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104931.036422] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x57A4A9FF, publisher_id: 0x001(3), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104931.042683] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x57A4A9FF, datawriter_id: 0x001(5), publisher_id: 0x001(3)
[micro_ros_agent-2] [1717104931.048564] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x57A4A9FF, topic_id: 0x002(2), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104931.055204] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x57A4A9FF, publisher_id: 0x002(3), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104931.072656] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x57A4A9FF, datawriter_id: 0x002(5), publisher_id: 0x002(3)
[micro_ros_agent-2] [1717104931.090499] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x57A4A9FF, topic_id: 0x003(2), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104931.095011] info     | ProxyClient.cpp    | create_subscriber        | subscriber created     | client_key: 0x57A4A9FF, subscriber_id: 0x000(4), participant_id: 0x000(1)
[micro_ros_agent-2] [1717104931.107278] info     | ProxyClient.cpp    | create_datareader        | datareader created     | client_key: 0x57A4A9FF, datareader_id: 0x000(6), subscriber_id: 0x000(4)

When I continuously press on for example: forward, the client and session is destroyed. The issue is when I start running the robot controller - teleop_twist_keyboard and try to move the robot, the micro-ROS will suddenly disconnect and cause a major lag in my robot movement.

This issue still persists. The micro-ROS keeps disconnecting halfway, making my robot very laggy.

hippo5329 commented 3 months ago

Have you tried reduce the motor max rpm and current with

define MOTOR_MAX_RPM [ your rpm / 2 ] // motor's max RPM

define PWM_MAX (pow(2, PWM_BITS) - 1) / 2

And try teleop with the robot lift above ground ( wheels do not touch ground). Please take a photo of your robot from top and photos of your wiring. I want to see all four wheels.

Leesanhang commented 3 months ago

Okay, I just did the changes to the esp32 config file. From what I observe, the movement is slightly better I think.

Btw, this is my robot currently. WhatsApp Image 2024-06-08 at 05 09 24_d2de3b57

hippo5329 commented 3 months ago

What is the 4.9 step down used for? The encoders should be powered by 3.3V. What is the 3.58 displayed for?

Leesanhang commented 3 months ago

Oh, the 4.9V is actually for Pi. But I'm using the original power source for now. The 3.58V is for displaying the overall battery and individual cell voltage level to prevent over-discharging the batteries.

Leesanhang commented 3 months ago

Actually, Im not too sure if its a power issue at all. Before this, I was running ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyUSB0 --baudrate 921600 (to check micro-ROS connection). Then I tried to use ros2 run teleop_twist_keyboard teleop_twist_keyboard to move the robot. There was no latency between the Pi and the ESP. Not sure why is the problem only occuring now.

Leesanhang commented 3 months ago

I suspected it was the MPU problem actually. I commented out the #define MPU line and the robot is moving perfectly.

hippo5329 commented 3 months ago

Where do you mount the mpu6050? Have you added 2K pull up to the sda scl? You should mount the mpu6050 on your prototype board. The i2c cable should be short.

Leesanhang commented 3 months ago

Shouldn't the MPU be mounted in the very middle of the robot? My prototype board is about right bottom of my robot. Yes, the 2K resistors are added between the 3V3 and SCL and SDA pins.

hippo5329 commented 3 months ago

The position of the IMU is not so important. We can adjust the IMU link later. The noise interference is more critical. I would suggest move the IMU on the prototype board.

Leesanhang commented 3 months ago

Hi again, sorry there were no updates on my side for the IMU. For the past few days, I've been trying to solve the problem but it seems quite impossible to fix for now. I figured I continue without the IMU (for now) because my robot will always be on flat and clean surfaces.

I've decided to move on to the SLAM and navigation part. The issue now is that when I run l ros2 launch linorobot2_navigation navigation.launch.py rviz:=true map:=/home/leesanhang/testing.yaml the Rviz does show up but the map is just plain blank,, without the robot and laser scans too.

hippo5329 commented 3 months ago

Have you tried move the IMU on the prototype board and use short wires to connect?

You should add a 220uF-470uF electrolytic capacitor to the VIN and GND of esp32. The small yellow cap is too small.

Have you tested the lidar on PC without esp32 pluged? https://github.com/Slamtec/sllidar_ros2 ros2 launch sllidar_ros2 view_sllidar_a2m8_launch.py

Then, on the robot, bringup, check /scan rate, it should be 10. ros2 topic hz /scan

run slam https://github.com/hippo5329/linorobot2_hardware/wiki#slam ros2 launch linorobot2_navigation slam.launch.py rviz:=true

Can you see the laser on slam rviz? Can y

Leesanhang commented 3 months ago

Hi again, sorry I have not given you an update. I was taking a short break. However, I have just tried everything and tried to map the indoor environment and it went well. Probably just abit of a slow feedback time when the robot is facing dynamic obstacles.

May I also ask, is Cartographer or GMapping used to run SLAM?

hippo5329 commented 3 months ago

Good.

"is Cartographer or GMapping used to run SLAM?", I don't know. I am new to ROS/NAV, too.

Leesanhang commented 3 months ago

Btw, I would like to see the /tf tree and I run the command: ros2 run tf2 tools_view_frames but it returns the error: no executable found Do you have any idea how to pull the transform frame tree up?

hippo5329 commented 3 months ago

ros2 run tf2_tools view_frames

Leesanhang commented 3 months ago

It returns the error: the following arguments are required: executable_name, argv

hippo5329 commented 3 months ago

sudo apt-get install ros-humble-tf2-ros ros-humble-tf2-tools

Leesanhang commented 3 months ago

It works, thank you.

Leesanhang commented 3 months ago

I realized the localization stack uses AMCL, hence the robot can determine where it is in the map without us setting its position in "estimate pose" in RViz. May I ask if you know how to use it, or how to implement it?

hippo5329 commented 3 months ago

http://wiki.ros.org/amcl#Parameters

~initial_pose_x (double, default: 0.0 meters) Initial pose mean (x), used to initialize filter with Gaussian distribution.

~initial_pose_y (double, default: 0.0 meters) Initial pose mean (y), used to initialize filter with Gaussian distribution.

The initial pose is required. The initial pose does not need to be very accurate.

Leesanhang commented 3 months ago

So, actually, AMCL does not just auto-detect where the robot is when RViz is launched?

hippo5329 commented 3 months ago

No. In case there are multiple rooms, there is no way to determine which room the robot is in.

Leesanhang commented 3 months ago

Im now facing a problem where it says "timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist.

This occurs quite frequently and Im not sure why, but now the navigation of my robot is very slow. As in the processing takes quite a long time.

hippo5329 commented 3 months ago

From the other cases, I learned that rplidar sensors require higher voltage power, just like raspi boards. I would suggest 5.25V power and short thick USB charging cables. You may use a step down from battery. You should check the voltage on the rplidar adapter. It should be higher than 4.9V.

A2M8 has higher sampling rate. It means there are more laser scan data to process. You may check CPU load with top or htop. You might consider rpi5 or mini pc N95/N100/N200 as robot computer.

You may also try discovery server and run navigation/rviz on a remote PC. https://github.com/hippo5329/linorobot2_hardware/wiki#use-ros2-with-fast-dds-discovery-server---optional

That way, run only bringup on robot computer and run navigation/slam/rviz on a remote PC.

Leesanhang commented 3 months ago

Okay, I will try that out. one more thing, When I try to use the waypoint following to navigate through multiple goals, the robot doesnt move as well. May i know if that can be fixed?

Leesanhang commented 3 months ago

I am currently testing the robot in the map but the feedback keeps aborting although the path is very big. May I know how I can fix that?

hippo5329 commented 3 months ago

Please describe the moving issue.

  1. Have you enabled the IMU?

  2. Have you adjust the velocity_smoother parameters for Y and reduced accelerations?

  3. The left/right wheels distance should be adjusted for Mecanum/4WD, which is different from differential drive. It might be the distance front-left wheel to rear-right wheel. You may try to find the setting where the error between laser scan and map is minimized.

hippo5329 commented 3 months ago

define WHEEL_DIAMETER 0.0560 // wheel's diameter in meters

  1. Have you checked the wheel speed with a digital tachometer in test_motors?
Leesanhang commented 3 months ago

Hi, so I've been trying your suggestions.

  1. Unfortunately, the IMU is still not working and i think i burnt it so it'll be a few days before i get a new one.
  2. I've adjusted it like you instructed. X=Y
  3. Im not sure if i understand. can you clarify?
  4. Unfortunately I dont have a tachometer. What else do you suggest i can do to check? My wheel diameter is 10cm so i defined it to be 0.05. This is in URDF right?
hippo5329 commented 3 months ago
  1. Did you place the IMU on prototype board? IMU is important.

  2. Try lower the accel to 1/2 the values.

  3. I pasted the wrong line. in esp32_config.h,

    define LR_WHEELS_DISTANCE 0.224

For Mecanum drive, the LR_WHEELS_DISTANCE will be larger than the front-left wheel to front-right wheel eg 20. It might be front-left wheel to rear-right wheel, eg, if the wheels position is square, 20 * 1.414 . You may have to adjust.

  1. You may try cellphone apps, tacho meter strobe. I have never tried.
Leesanhang commented 3 months ago

The distance (from centre of wheels) from left to right is 49 while centre of front to back is 46. Can you advice me on how to define the LR_WHEELS_DISTANCE ?

hippo5329 commented 3 months ago

Between 0.49-0.67. You may try 0.6. Check the error when robot turn and try other values.

hippo5329 commented 3 months ago

IMG_20240618_073101.jpg

hippo5329 commented 3 months ago

You used some expensive lidar, motors, encoders and motor drivers. They won't give you better result for the first time robot. It will be easier if you start over with a small, light-weight and cheap robot as I suggested "the first robot for beginner" in my wiki. Lesson learned from small robot will help you with larger, more powerful robots. It will only waste your time (and mine), if you skip the simple step, jump into your dream robot and want to success in the first try. NO WAY. You need to learn the basic.

Your wiring is a mess.

You need to use thick short wires to connect the battery to motor controllers. Remove all unnecessary connectors. Use soldering if possible.

Add large 220uF-470uF electrolytic capacitors to your powers near the loads.

Add a battery voltage ADC sensor. It is important to diagnosis power issue.

Start with 12V power. Use only one 12V battery. Change the MAX_RPM to 1/2 the value. It will move slower and this will be fine for the first time robot.

Put IMU on your prototype board.

Leesanhang commented 3 months ago

Thank you for your suggestions. I guess I was too ambitious from the start. I will take your advice and try to start small first. Actually, on a side note, may I get your full name? I would like to include you in the acknowledgement part of my report.

hippo5329 commented 3 months ago

Good. The starter robot is a learning tool.

Thomas Chou