Panther joy2Twist

Hi there,

I would like to investigate two items:

  • ability to remap the joy2twist output to a /cmd_vel_raw instead of /cmd_vel, so I can create a node that would lower the robot speed upon proximity detection of obstacle on a LIDAR for instance. The node would subscribe to /cmd_vel_raw (and lidar points or scan) and publish on /cmd_vel (or /panther/cmd_vel). For now I would only be after how could I be remapping the joy2twist output /cmd_vel to /cmd_vel_raw. I tried direct remap in the docker compose.yaml file, by adding to the launch command of joy2twist, but you cannot remap from there (ie you cannot remap from a terminal ros2 launch command). So you would have to add this remapping in the ros2 joy2twist launch file directly, but I have not identified where the launch file (which directory) it would be on the built in computer. Is it contained inside the docker container or any physical folder on the built in computer?
  • in addition I would like to be able to do keybinding between a specific button being pressed and a node executing some functions when the button is pressed on the joypad F710. I believe the joy2twist publishes the joy topic with all the buttons state, is that correct? If so I could use the joy topic published by built-in computer and nodes on user computer to execute required functions by subscribing to this topic.

Thank you,

Nicolas

Hi @Nico2025,

Remapping the topic would have to be done by replacing the launch file with the appropriate remapping. The easiest way is to copy the current launch file, add the changes, and link it as a Docker volume.

Docker is built with the --symlink-install flag, so you can replace the file in both the /ros2_ws/install/<pkg>/... or /ros2_ws/src/<pkg>/... paths. Regarding the gamepad, the package you are interested in is joy2twist.

After such a change, you need to reload Docker.

The alternative would be to create a form and build your own docker image, which for such a small change is overkill.

Hi,

thank you for that, but where exactly would I need to do the modification on the built in computer of an actual Panther. For now I can see the ~/compose.yaml file which specifies:

  • husarion_ugv_ros:
    image: husarion/husarion-ugv:humble-2.2.2-20250702
    container_name: husarion_ugv_ros

  • ros2 launch husarion_ugv_bringup bringup.launch.py
    common_dir_path:=/config
    launch_gamepad:=true

So the system launches using a docker image, and not sure if you can modify the ros2 launch file directly in the image and if so how? Here is what I get when listing docker images:

docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
husarion/husarion-ugv humble-2.2.2-20250702 0992abbd81c4 10 months ago 2.19GB

Nicolas