diff --git a/README.md b/README.md index 70ea9d1..39206d6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Joy2Twist -Dockerized ROS node allowing control of ROS-powered mobile robots with Logitech F710 gamepad. Joy2Twist node is converting `sensor_msgs/Joy` message to `geometry_msgs/Twist` in order to provide velocity commands for the mobile robot. Therefore this package is compliant (but not supported by Husarion) with any other gamepad controller which is able to publish the `sensor_msgs/Joy` message. +Dockerized ROS node allowing control of ROS-powered mobile robots with Logitech F710 gamepad. Joy2Twist node is converting `sensor_msgs/Joy` message to `geometry_msgs/Twist` in order to provide velocity commands for the mobile robot. Therefore this package is compliant (but not supported by Husarion) with any other gamepad controller which is able to publish the `sensor_msgs/Joy` message. ## Setup joy @@ -46,7 +46,7 @@ ROS node is translating `/joy` topic to `/cmd_vel` topic. Following parameters change joystick axes mapped to given robot axes of freedom. For more information about parameter values, refer to the joy package [wiki page](http://wiki.ros.org/joy#Logitech_Wireless_Gamepad_F710_.28DirectInput_Mode.29). -- `~axis_linear_x` *(int, default: 3)* +- `~axis_linear_x` *(int, default: 3)* - `~axis_linear_y` *(int, default: 2)* - `~axis_angular_z` *(int, default: 0)* @@ -90,8 +90,8 @@ Available on [Docker Hub](https://hub.docker.com/r/husarion/joy2twist/tags) 3. Launch on ROSbot Go to the `joy2twist/demo` folder and run: - + ```bash cd joy2twist/demo - docker compose -f compose.rosbot.yaml up + docker compose -f compose.rosbot.melodic.yaml up ``` diff --git a/demo/compose.rosbot.humble.yaml b/demo/compose.rosbot.humble.yaml new file mode 100644 index 0000000..92362db --- /dev/null +++ b/demo/compose.rosbot.humble.yaml @@ -0,0 +1,31 @@ +x-gpu-config: + &gpu-config + runtime: nvidia + environment: + - DISPLAY=${DISPLAY:?err} + - NVIDIA_VISIBLE_DEVICES=all + - NVIDIA_DRIVER_CAPABILITIES=all + +x-cpu-config: + &cpu-config + environment: + - DISPLAY=${DISPLAY:?err} + - LIBGL_ALWAYS_SOFTWARE=1 + +services: + rosbot_xl: + image: husarion/rosbot-xl-gazebo:humble-0.8.2-20230913-stable + <<: *gpu-config + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix:rw + - /dev:/dev + command: ros2 launch rosbot_xl_gazebo simulation.launch.py mecanum:=True + + joy2twist: + image: husarion/joy2twist:humble-1.0.0-20230424-stable + devices: + - /dev/input/js0 + volumes: + - ../joy2twist/config/joy2twist.yaml:/joy2twist.yaml + command: ros2 launch joy2twist gamepad_controller.launch.py + joy2twist_params_file:=/joy2twist.yaml diff --git a/demo/compose.rosbot.yaml b/demo/compose.rosbot.melodic.yaml similarity index 100% rename from demo/compose.rosbot.yaml rename to demo/compose.rosbot.melodic.yaml