1

The purpose of this idea is to control my original robot for tele-operating String-based ROS2 robots with my Xbox Gamepad.

I used to use a keyboard, but I wanted to use a controller for convenience, so I try joy-package.

Until now, I have been using inverse kinematics on ROS2 to calculate the control angle of the serial servo, and sending the calculated Int and Float types as String types to the microcontroller through xrce-micro-dds-Agent for control.

Those reasons are why I cant use teleop-twist-joy package. I don't want to publish these messages as Twist Messages. I want to send them to a new topic.

What I want to do is as follows.

  1. I want to write a Subscriber to the topic "/joy" and get the data of each Button and each Axes.
  2. Joystick messages to be translated to String messages.
  3. I want to Publish to the topic as (node, std_msgs/msg/String).

so that I can use them in controlling my robot by Xbox Gamepad.

I followed ros document Tutorial : " http://wiki.ros.org/joy/Tutorials/WritingTeleopNode " and I wanted to edit it. But this tutorial shows ROS writing and took information only from the Axis. I want to get from the Buttons too.

Can I have some help or maybe a link to package already done for this type of problems ?

Also, I'm not very good at English, so I'm sorry if my English is difficult to understand or if my sentences are strange.

HabaneROS
  • 11
  • 2
  • A couple of things. 1) The linked package is actually a ROS1 package, so a few things will be different. 2) An `Axis` is considered any input from the joystick. That would cover buttons, too. – BTables Dec 16 '21 at 21:25

0 Answers0