Skip to content

Commit

Permalink
separated melodic ros bridge demo | added simulation demo
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <[email protected]>
  • Loading branch information
delihus committed Nov 27, 2023
1 parent f371070 commit e3d64a3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)*

Expand Down Expand Up @@ -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
```
31 changes: 31 additions & 0 deletions demo/compose.rosbot.humble.yaml
Original file line number Diff line number Diff line change
@@ -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.11-20231127
<<: *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
File renamed without changes.

0 comments on commit e3d64a3

Please sign in to comment.