ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

joy_node how to publish to cmd_vel topic? [closed]

asked 2022-07-20 22:45:41 -0500

TK hobby gravatar image

So, Ubuntu 20.04 with Noetic installed on robot. Have a motor driver working and can drive the bot with:

"rosrun teleop_twist_keyboard cmd_vel=:/hoverboard_velocity_controller/cmd_vel"

Then installed joy_node, and tested input from game controller. (don't seem to have proportional values from joy sticks - a drama for later) but for now I just need it to publish to /hoverboard_velocity_controller/cmd_vel.

How do I do that?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by TK hobby
close date 2022-07-27 19:53:56.010244

1 Answer

Sort by » oldest newest most voted

answered 2022-07-21 01:39:06 -0500

Per Edwardsson gravatar image

There's a node called teleop_twist_joy which listens to joy messages and produces Twist messages. Works with a bunch of different joysticks. That joystick problem seems problematic though - maybe fix it before testing with live motors. 🫠

edit flag offensive delete link more


OK, so start joy_node- witch reads joystick, then start teleop_twist_joy- witch listen to joy..stick and then add: cmd_vel:=/hoverboard....../cmd_vel. - witch should then publish Twist messages to robot just like : teleop_twist_keyboard ?

I will give a it a go soon. got caught with my pants down.... installed something (with out making a backup) and broke my serial coms to robot. I have borrowed a xbox 360 wired controller to test and see if issue is with my controller or somewhere else.

Thanks for now

TK hobby gravatar image TK hobby  ( 2022-07-21 21:22:19 -0500 )edit

spot on! thanks that solved it. joy_node. another terminal run teleop_twist_joy and add cmd:=what ever you want to pipe it to If you want to change the parametors then add _paramettor after dont forget the dash

TK hobby gravatar image TK hobby  ( 2022-07-25 01:56:39 -0500 )edit

Awesome! Don't forget to mark the answer as correct.

Per Edwardsson gravatar image Per Edwardsson  ( 2022-07-25 03:04:06 -0500 )edit

Question Tools



Asked: 2022-07-20 22:45:41 -0500

Seen: 28 times

Last updated: Jul 21