-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Waiting for robot_description to be published on robot_description topic #15
Comments
Update: When I run: I also did try to unplug and plug my esp32, and it only publishes up until "running" instead of "logger setup". |
|
I added more details on micro-ros agent connection test and bringup launch. Please check the wiki. |
Hi again, I am quite new to ROS so there are quite a few things that I am still unfamiliar with. For the past day, I have been trying to do step 2 and this is the output I am getting. The open device errors are due to me unplugging the esp and plugging it back in. I didn't face this problem before I started the changes at https://github.com/hippo5329/linorobot2_hardware/wiki#custom-configuration-file---recommended I am quite unsure on how to proceed now. |
No worries. I am new to ROS2 and I keep learning, too. |
The access mode of ttyUSB0 might be wrong. You might miss the step, Install PlatformIO udev rules. curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/system/99-platformio-udev.rules | sudo tee /etc/udev/rules.d/99-platformio-udev.rules Then unplug and plug esp32. $ ls /dev/ttyU* -l |
So, I've tried doing everything from scratch again and I've passed the connection test here: https://github.com/hippo5329/linorobot2_hardware/wiki#esp32-with-micro-ros-serial-transport And now, I am currently doing step 3 in your earlier comment: https://github.com/hippo5329/linorobot2_hardware/issues/15#issuecomment-2133987557 This is the output I am getting: Is there any way I can complete this project without implementing the IMU? Edit: I tried to skip to https://github.com/hippo5329/linorobot2_hardware/wiki#test-the-motors-and-encoders and the same thing is happening. Random characters are appearing. I actually had no issues with particular part running earlier. Edit 2: Now that I'm doing the connection test again after doing the steps from https://github.com/hippo5329/linorobot2_hardware/wiki#custom-configuration-file---recommended , the same issue from earlier is happening. |
Good. Please tell me which IMU you use. And show me the configuration of your IMU. The micro-ROS middle ware is running on the serial. So you will see random chars because the communication is binary, not ascii code. Keep the baud rate at 921600. You will need to press reset button on the esp32 to see the messages right after boot. |
You should run the test_sensors. There is no micro-ros protocol in test_sensors. Press reset button on the esp32 to see the boot message. |
I am using an MPU6050. My IMU is connected to an Arduino 5V and GND for the time being, and the SDA and SCL are connected to pins 21 and 22 of my ESP respectively. |
Why Arduino? Connect 5V to 5V on esp32 module. |
Connect 5V of MPU6050 to 5V on esp32. Connect gnd of MPU6050 to gnd on esp32. |
Sorry but I dont actually have a 5V pin on my ESP. I am using this dev board: https://i0.wp.com/circuits4you.com/wp-content/uploads/2018/12/ESP32-Pinout.jpg?resize=604%2C373&ssl=1 |
Please check with a multimeter the Vin of esp32. If you see 5-4.5V, then use the Vin. Otherwise use 3.3V output of esp32. |
I check the same module. The Vin is 4.6V. You can use Vin to 5v of MPU6050. |
There is a LDO 3.3V on the GY521. The MPU6050 chip uses 3.3V. It is fine. |
I've connected all the relevant pins as you instructed in previous comments. 5V and GND of IMU to Vin and GND of ESP. |
pio device monitor -e esp32 -b 921600 |
I've tried defining the baudrate for earlier comments too. Same, using "-b 921600" but the outputs are the same. Same case for this "test_sensors" command. |
I'm really not sure why is it outputting these characters. I had no such issues earlier, even when running "test_motors", "test_sensors", and "test_acc". |
cd test_motors ACC 0.00 0.00 0.00 GYR 0.00 0.00 0.00 MAG 0.00 0.00 0.00 ACC 0.00 0.00 0.00 GYR 0.00 0.00 0.00 MAG 0.00 0.00 0.00 |
Remove previous libs build. Then build again. |
Sorry but what does this error mean? |
It might be link. It is not important. Rebuild and test again. |
Oh, I deleted pio. Need to reinstall platformio. curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py |
Yup, I just realised platformio was deleted. Got it, I reinstalled and I am trying to build now. |
with mpu9250, and press reset button. ACC 0.06 -0.04 11.17 GYR -0.07 -0.07 -0.07 MAG 0.00 0.00 0.00 ACC 0.60 -1.51 10.80 GYR 0.07 0.03 0.07 MAG 0.00 0.00 0.00 |
Do you use ubuntu alone or are you using ubuntu inside windows? |
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. |
Shouldn't the MPU be mounted in the very middle of the robot? My prototype board is about right bottom of my robot. |
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. |
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 |
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? Then, on the robot, bringup, check /scan rate, it should be 10. run slam Can you see the laser on slam rviz? |
Hi again, sorry I have not given you an update. I was taking a short break. May I also ask, is Cartographer or GMapping used to run SLAM? |
Good. "is Cartographer or GMapping used to run SLAM?", I don't know. I am new to ROS/NAV, too. |
Btw, I would like to see the /tf tree and I run the command: |
ros2 run tf2_tools view_frames |
It returns the error: the following arguments are required: executable_name, argv |
sudo apt-get install ros-humble-tf2-ros ros-humble-tf2-tools |
It works, thank you. |
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? |
http://wiki.ros.org/amcl#Parameters ~initial_pose_x (double, default: 0.0 meters) ~initial_pose_y (double, default: 0.0 meters) The initial pose is required. The initial pose does not need to be very accurate. |
So, actually, AMCL does not just auto-detect where the robot is when RViz is launched? |
No. In case there are multiple rooms, there is no way to determine which room the robot is in. |
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. |
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. That way, run only bringup on robot computer and run navigation/slam/rviz on a remote PC. |
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? |
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? |
Please describe the moving issue.
|
#define WHEEL_DIAMETER 0.0560 // wheel's diameter in meters
|
Hi, so I've been trying your suggestions.
|
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.
|
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 ? |
Between 0.49-0.67. You may try 0.6. Check the error when robot turn and try other values. |
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. |
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. |
Good. The starter robot is a learning tool. Thomas Chou |
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:
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:
Any help to solve this issue is much appreciated, Thank youu!
The text was updated successfully, but these errors were encountered: