DataBot-Labs / hoverboard_ros2_control

62 stars 14 forks source link

Over whelming, please scale down #4

Open Tjaart-Hobby opened 1 year ago

Tjaart-Hobby commented 1 year ago

Hi I have a dif drive robot using hoverboard wheels, ros1 and using Alex's hoverboard driver. I want to upgrade to Huble so was looking at your work. Launching yours bring up Rviz, joy nodes for PS4 and so on. This work load is to much for my PI4 4G.

All that s needed is the uart driver for wheels with there feed back on ttyUSB0 (PI port) and a config for wheel separation and diameter. The rest can be done on stronger computer through ssh. (tellyop twist joy, rviz and such)

I am willing to contribute for your work, buy you a coffee or pizza. I am just a hobbyist

edit: found https://github.com/DataBot-Labs/hoverboard_ros2_control/blob/main/hoverboard_hardware_interface/include/hoverboard_hardware_interface/hoverboard_hardware_interface.hpp line 42 - port setting https://github.com/DataBot-Labs/hoverboard_ros2_control/blob/main/hoverboard_demo_bringup/config/hoverboard_controllers.yaml line 16 and 18 - wheel diameter and separation

So looking for launch file on mobile pi-bot that subscribes to cmd_vel topic and publishes relevant info for mapping and so on. please

rgruberski commented 1 year ago

Hi @Tjaart-Hobby, thank you for your kind words. To run it without additional nodes you can use just the hardware interface, without description, bringup, etc. As you can see in the main repo directory, there are four different packages, use only what you exactly need. The most important is the hoverboard_hardware_interface package. The device is set as the parameter and read in the hoverboard_hardware_interface.cpp file. If you have your robot description file in urdf/xacro format, then you can add the ros2_control.xacro file from the hoverboard_demo_description package and tune the parameters. In this file, you can set the correct device, baud rate, ticks per revolution, and more. The same tune you have to do in the hoverboard_controllers.yaml file from the hoverboard_demo_bringup package.

If you want to remove any of the functionalities, just edit the launch file in the hoverboard_demo_bringup package, available here:

https://github.com/DataBot-Labs/hoverboard_ros2_control/blob/main/hoverboard_demo_bringup/launch/hoverboard.launch.py

The whole project is based on the ros2_control project, so, you will have all data you need available in ros2 topics.

Please tell me if need more support, and I will try to help you. If you want to contribute, you are welcome. Just make a new branch and the pull request after you finish your work.

Tjaart-Hobby commented 1 year ago

Hi, thank you for responding. I had a look at ros2_control project and attempted to mach it up with your repository. Being knew to ros2 I feel a bit flustered.

So without deleting any thing I can just comment out the return nodes in launch file?

return LaunchDescription([ control_node, robot_state_pub_node, ' (comment out) joint_state_broadcaster_spawner, (comment out) robot_controller_spawner, (comment out) rviz_node, (comment out) joy_node, (comment out) teleop_twist_joy_node, ])

I thought about removing unnecessary folder/files like "hoverboard_demo_description" but since they are reverenced in other bits of code I don't know if I should chance it. The mobile robot only uses a 64G memory stick. So I try to lean down all code running on the bot.

Tjaart-Hobby commented 1 year ago

Hi I am sorry, I am struggling to much extracting just the driver to run on mobile base. Unfortunately the code is interconnected and removing one thing causes another not to build. Please help.