deborggraever / ros2-mecanum-bot

ROS2 Mecanum wheel robot
GNU General Public License v3.0
97 stars 26 forks source link

mecanumbot_bringup/rviz2.py (not showing the robot) #14

Closed szeyuan1227 closed 5 months ago

szeyuan1227 commented 6 months ago

when i run the rviz2.py, the drop down list for the fixed frame not working, the error in global status is no tf data, frame [base_link] does not exist

szeyuan1227 commented 6 months ago

ros2 topic list also does not show all available topics running, btw im using docker

deborggraever commented 6 months ago

Can u describe which containers and commands u run?

szeyuan1227 commented 6 months ago

Can u describe which containers and commands u run?

I've got some updates on what was causing the problem. Turns out, it was all about using the wrong Docker image lolll. my host machine is arm64 arch, but the Docker image I picked didn't support that. So, because of that mismatch, ROS2 couldn't find the topic it needed, I switched over to this other Docker image called 'sky360/ros2-humble-full:latest', and the topic appeared. but when I try to run RViz2 and Gazebo with this image in a container, they just won't cooperate. So I plan to run the actual robot without simulation. Btw the dockerfile and compose file I've push to my github repository 'sy_project2', have a look if u r interested.

deborggraever commented 6 months ago

Nice, i did not look into running ROS2 on Docker yet. I run the actual robot with a Raspberry Pi 4 running Ubuntu / ROS2 installed connected to a custom PCB based on Atmega4809. I will replace that last with an atmeta4809 Curiosity and some breakout boards once i have more time to work on the project, so i can also share the hardware part and build instructions.

szeyuan1227 commented 5 months ago

Nice, i did not look into running ROS2 on Docker yet. I run the actual robot with a Raspberry Pi 4 running Ubuntu / ROS2 installed connected to a custom PCB based on Atmega4809. I will replace that last with an atmeta4809 Curiosity and some breakout boards once i have more time to work on the project, so i can also share the hardware part and build instructions.

great, are u writing this from scratch? because im relatively new to ros2 and docker, currently using ur repository for my fyp, but encounter several problem along the way and I'm unsure how to address them.

deborggraever commented 5 months ago

Yes, it was written from scratch, but it's my second robotics project. If u have questions, feel free to ask.

szeyuan1227 commented 5 months ago

Yes, it was written from scratch, but it's my second robotics project. If u have questions, feel free to ask.

ya act i do have some questions, the main issue im struggling with is the serial port failed to get configuration, besides that, i have to modify the state interface to a default value since i dont have an encoder on the motor while im not sure where i should make this modification (is it in hardware interface -- read function?), and the last one, i found that you have a firmware for this repo right? Is it compatible with Arduino Mega 2560? If so, how can I use it?

deborggraever commented 5 months ago

You should be able to create a custom firmware on any device that support serial port. My first project on my old repo use the same serial protocol (HDLC) on Arduino https://github.com/randy-deb/ampru/tree/master/ampru_base/firmware

This is the AMPRU in action https://www.youtube.com/watch?v=4fARgVNcKIU

In the hardware node u communicate with the "hardware (arduino / custom PCB) https://github.com/deborggraever/ros2-mecanum-bot/blob/main/mecanumbot_hardware/src/mecanumbot_hardware.cpp

In the write function u send into to drive the motors.

In the read function u should get the values from the encoders, IMU, battery state, ... Currently the read code is mostly commented out cause I don't have these implemented yet in the firmware.