hoverboard-robotics / hoverboard-driver

ROS hardware driver for UART-controlled hoverboard
MIT License
96 stars 52 forks source link

How to send cmd_vel commands #14

Closed MartinNievas closed 3 years ago

MartinNievas commented 3 years ago

Hi, first of all, thanks for sharing the project

I could not make it work, my setup is:

Steps:

  1. Flashed a hoverboard with the latest bipropellant firmware. An adjusted some configurations for the battery.
  2. Compile the latest version of hoverboard-driver through catkin make without errors. Changed PORT in include/hoverboard_driver/config.h with my USB-uart adapter id.
  3. Run the code through:
    $ roslaunch hoverboard_driver hoverboard.launch
  4. Open a new terminal and send velocity commands with:
    $ rosrun teleop_twist_keyboard teleop_twist_keyboard.py cmd_vel:=/hoverboard_velocity_controller/cmd_vel

But I don't get any movement on the wheels.

I also tried these configurations:

  1. Not worked

    • bipropellant-hoverboard-firmware [latest]
    • hoveboard-driver in this commit
  2. Not worked

    • bipropellant-hoverboard-firmware [latest]
    • hoveboard-driver in this commit

I can run bipropellant-hoverboard-firmware with DEBUG_SERIAL_ASCII and I can send manual PWM command to the hoverboard, and the wheels start to spinning.

Is there is something that I missed? Thanks

Andyzug commented 3 years ago

Hi! Try to follow these steps: https://github.com/alex-makarov/hoverboard-driver/issues/13#issuecomment-803681694 and this firmware: https://gist.github.com/busbuyukefe/0230aedd1c5914bc7cdb11fb24a967c8

MartinNievas commented 3 years ago

@Andyzug steps in https://github.com/alex-makarov/hoverboard-driver/issues/13#issuecomment-803681694 worked perfectly.

I didn't realize that hbprotocol is a submodule in the bipropellant-hoverboard-firmware that need's to match with the submodule used in hoverboard-driver. So, after pointing hbprotocol to the same version in both repositories, I can send cmd_vel commands and both wheels are spinning.

Thanks for the binary. But because I have to modify the original code of the hoverboard, I need to compile it from the repository.

Thanks a lot! :D