Skip to content
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

REGARDING TELEOP IN REAL ROBOT #3

Open
randy0011x opened this issue Mar 28, 2023 · 4 comments
Open

REGARDING TELEOP IN REAL ROBOT #3

randy0011x opened this issue Mar 28, 2023 · 4 comments

Comments

@randy0011x
Copy link

Hello sir, I have been following your videos for my project sequentially. I have a small snag. In simulation, the ros2_control teleop works perfectly and both gazebo and rviz responds accordingly, but in the real robot, "THE TELEOP WORKS PERFECTLY IN REAL ROBOT BUT THE RVIZ RECEIVES WRONG TF, I.E IF I PRESS 'I', THE REAL ROBOT MOVES FORWARD BUT IN THE RVIZ, IT ROTATES COUNTER CLOCKWISE, SIMILARLY IF I PRESS 'J', THE REAL ROBOT ROTATES BUT IN THE RVIZ. " I have even cloned your repository in a new workspace for verification but the rviz still dosen't respond properly to my teleop command. I have cross verified my TF in robot_core.xacro, ros2_control.xacro, and my_controllers.yaml code.I kindly request you to share your insights in this regard.

Thanks in advance

@Buzzology
Copy link

Buzzology commented Mar 28, 2023

Hey @randy0011x , just double check your encoders/odom are correct. If you've got the wires or pins around the wrong way you'll see that. I have these notes from one of Josh's good videos on it:

- List connected usb devices: `lsusb` or `ls /dev/ttyUSB*`
  - `QinHeng Electronics HL-340 USB-Serial adapter` is arduino  
- Use miniterm to send messages via serial to arduino:
  - Start miniterm: `miniterm -e /dev/ttyUSB0 57600`
    - Could be this if you're using a newer version: `pyserial-miniterm -e /dev/ttyUSB0 57600`
  - See current encoder count: `e`
  - Start motor full speed: `o 255 255`
  - Start motor half speed: `o 127 127` 
  - Reset encoder count: `r`   

I did a quick post when I hit the same thing: https://whatibroke.com/2022/12/29/wheel-going-in-the-wrong-direction-rviz2-and-foxglove/

@randy0011x
Copy link
Author

randy0011x commented Mar 28, 2023 via email

@randy0011x
Copy link
Author

randy0011x commented Mar 29, 2023 via email

@NDL200201
Copy link

@randy0011x @Buzzology Hi, I installed diffdrive_arduino of GitHub - Buzzology/diffdrive_arduino: A simple ROS Control Hardware Interface for differential drive control of robot whose motors are connected via an Arduino (or similar microcontroller).. I can run teleop_twist_keyboard to drive my around. My motors can work. But when I open rviz2 for tracking, when I press some letters ‘i’ and ‘m’ on the keyboard, the robot runs circle around base_link , doesn’t go straight ( forward and backward). I installed ROS2 HUMBLE. Can you help me, plz?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants