Replies: 11 comments 16 replies
-
Here is what it does step by step on the wiki: guen@raspberry:~/guenbot_hardware/firmware$ ros2 topic hz /imu/data guen@raspberry:~/guenbot_hardware/firmware$ ros2 topic hz /odom guen@raspberry:~/guenbot_hardware/firmware$ ros2 topic hz /joint_states guen@raspberry:~/guenbot_hardware/firmware$ ros2 topic hz /scan |
Beta Was this translation helpful? Give feedback.
-
max rpm should be 150 for your motor.
stop distance is too long, 0.25m = 25cm. which motor and motor driver do you use?
|
Beta Was this translation helpful? Give feedback.
-
Your motor is 150rpm variant. L298 does support fast motor stop. For Mecanum drive, the LR_WHEELS_DISTANCE should somewhere as front-right to rear-left. |
Beta Was this translation helpful? Give feedback.
-
How much is your robot weight? |
Beta Was this translation helpful? Give feedback.
-
When launching bringup.launch.py it shows the following error message: |
Beta Was this translation helpful? Give feedback.
-
You should check the real rpm with a tachometer if you can find one. Or you may try tachometer/strobe light app on your phone. 22 is too small for your Mecanum driver. What is the distance of front-right wheel to front-left? front-right to rear-right? Then you can find the trigonometry. When you do the slam, do not turn, only forward and backward. You can see the error between laser and your map. This is the linear wheel odometry error. Next, turn only. You can see the rotation error. |
Beta Was this translation helpful? Give feedback.
-
Hi @hippo5329 today my motors 1-3 are spinning continuously even though they are not receiving control commands, motors 2-4 do not have the same problem when running the firmware. test_motor shows that motors 1-2-3-4 are still working normally and functioning properly. |
Beta Was this translation helpful? Give feedback.
-
During developments process, things went wrong often. It will be helpful to revert to previous working state. You can use git to keep track your code changes. You can revert your changes with commits or try different alternatives with git branches. I use both KVM snapshots and LXD/ZFS snapshots to create snapshots at each check points. So that I can revert to previous working state easily. I use wired connection and create a bridge to connect them. Because ROS2 RMW uses broadcast. So bridged connections works best. In your case, you should save current work and revert to previous working state. |
Beta Was this translation helpful? Give feedback.
-
You should run test_motors after you modify the motors/encoders connection. |
Beta Was this translation helpful? Give feedback.
-
Follow this link to build libcamera, https://www.raspberrypi.com/documentation/computers/camera_software.html#building-libcamera You will need to install missing dependencies. I am still working on this. |
Beta Was this translation helpful? Give feedback.
-
this is an object recognition program, and it has x,y distance division of the frame. But I still don't know how to control it to fit the mecanum wheel. Can you give me an idea? |
Beta Was this translation helpful? Give feedback.
-
Hi @hippo5329 after some difficulty i got to the step of building the map but it is quite chaotic as in the picture. can you help me?
I followed every step as in the wiki and this is what I tweaked to fit the robot:
#define MOTOR_MAX_RPM 170 // motor's max RPM
#define MAX_RPM_RATIO 0.6 // max RPM allowed for each MAX_RPM_ALLOWED = MOTOR_MAX_RPM * MAX_RPM_RATIO
#define MOTOR_OPERATING_VOLTAGE 12 // motor's operating voltage (used to calculate max RPM)
#define MOTOR_POWER_MAX_VOLTAGE 12 // max voltage of the motor's power source (used to calculate max RPM)
#define MOTOR_POWER_MEASURED_VOLTAGE 12 // current voltage reading of the power connected to the motor (used for calibration)
#define COUNTS_PER_REV1 780 // wheel1 encoder's no of ticks per rev
#define COUNTS_PER_REV2 780 // wheel2 encoder's no of ticks per rev
#define COUNTS_PER_REV3 780 // wheel3 encoder's no of ticks per rev
#define COUNTS_PER_REV4 780 // wheel4 encoder's no of ticks per rev
#define WHEEL_DIAMETER 0.097 // wheel's diameter in meters
#define LR_WHEELS_DISTANCE 0.22 // distance between left and right wheels
#define PWM_BITS 10 // PWM Resolution of the microcontroller
#define PWM_FREQUENCY 20000 // PWM Frequency
#define SERVO_BITS 12 // Servo PWM resolution
#define SERVO_FREQ 50 // Servo PWM frequency
Beta Was this translation helpful? Give feedback.
All reactions