Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separated melodic ros bridge demo | added simulation demo #13

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.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
File renamed without changes.
Loading