-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added manipulation package for ROSbot XL - choosing the configuraiton with `sudo snap set rosbot-xl configuraiton=manipulation` (available options: `basic`, `manipulation`) - added support for a USB gamepad (started with `sudo snap start rosbot-xl.joy` - Group `ros-domain-id`, `ros-localhost-only`, `tranport` and `namespace` behind the `ros` key
- Loading branch information
Showing
31 changed files
with
1,268 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Usage: | ||
# xhost +local:docker && docker compose up | ||
|
||
x-net-config: | ||
&net-config | ||
network_mode: host | ||
ipc: host | ||
env_file: net.env | ||
|
||
x-gpu-config: | ||
&gpu-config | ||
runtime: nvidia | ||
environment: | ||
- DISPLAY=${DISPLAY:?err} | ||
- NVIDIA_VISIBLE_DEVICES=all | ||
- NVIDIA_DRIVER_CAPABILITIES=all | ||
|
||
services: | ||
rviz: | ||
# Launching rviz with moveit2 requires all the configs, using manipulation simulation image is easiest option | ||
image: husarion/rosbot-xl-manipulation-gazebo:humble | ||
<<: [ *net-config, *gpu-config ] | ||
container_name: rviz | ||
volumes: | ||
- /tmp/.X11-unix:/tmp/.X11-unix:rw | ||
- ./config/rosbot_xl.rviz:/ros2_ws/install/rosbot_xl_manipulation_moveit/share/rosbot_xl_manipulation_moveit/config/moveit.rviz | ||
command: ros2 launch rosbot_xl_manipulation_moveit rviz.launch.py | ||
|
||
joy2twist: | ||
image: husarion/joy2twist:humble-1.0.0-20230204-stable | ||
<<: *net-config | ||
devices: | ||
- /dev/input | ||
volumes: | ||
- ./config/joy2twist.yaml:/joy2twist.yaml | ||
command: > | ||
ros2 launch joy2twist gamepad_controller.launch.py | ||
joy2twist_params_file:=/joy2twist.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/**: | ||
ros__parameters: | ||
linear_velocity_factor: | ||
fast: 1.0 | ||
regular: 0.5 | ||
slow: 0.2 | ||
|
||
angular_velocity_factor: | ||
fast: 1.5 | ||
regular: 0.8 | ||
slow: 0.4 | ||
|
||
# This button mapping should be adjusted to the specific controller | ||
# The following map is suited for Logitech F710 | ||
button_index_map: | ||
axis: | ||
angular_z: 2 # Right joystick | ||
linear_x: 1 # Left joystick | ||
linear_y: 0 # Left joystick | ||
dead_man_switch: 4 # LB | ||
fast_mode: 7 # RT | ||
slow_mode: 5 # RB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# ======================================= | ||
# Network config options (uncomment one) | ||
# ======================================= | ||
|
||
# 1. Fast DDS + LAN | ||
# RMW_IMPLEMENTATION=rmw_fastrtps_cpp | ||
|
||
# 2. Cyclone DDS + LAN | ||
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp | ||
|
||
# 3. Fast DDS + VPN | ||
# RMW_IMPLEMENTATION=rmw_fastrtps_cpp | ||
# FASTRTPS_DEFAULT_PROFILES_FILE=/husarnet-fastdds.xml | ||
|
||
# 4. Cyclone DDS + VPN | ||
# RMW_IMPLEMENTATION=rmw_cyclonedds_cpp | ||
# FASTRTPS_DEFAULT_PROFILES_FILE=/husarnet-fastdds.xml | ||
# CYCLONEDDS_URI=file:///husarnet-cyclonedds.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash -e | ||
|
||
STATE=$1 | ||
|
||
ros2 service call /controller_manager/set_hardware_component_state \ | ||
controller_manager_msgs/srv/SetHardwareComponentState \ | ||
"{name: 'manipulator', target_state: {id: 0, label: '${STATE}'}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
#!/bin/bash -e | ||
|
||
NAMESPACE="$(snapctl get driver.namespace)" | ||
LAUNCH_OPTIONS="" | ||
|
||
# Check if the namespace is set and not empty | ||
# Retrieve the namespace using snapctl | ||
NAMESPACE="$(snapctl get ros.namespace)" | ||
|
||
# Check if NAMESPACE is not set or is empty | ||
if [ -n "$NAMESPACE" ]; then | ||
ros2 launch $SNAP/usr/bin/bridge_launch.py namespace:=${NAMESPACE} | ||
else | ||
ros2 launch $SNAP/usr/bin/bridge_launch.py | ||
LAUNCH_OPTIONS+="namespace:=${NAMESPACE} " | ||
fi | ||
|
||
ros2 launch $SNAP/usr/bin/bridge_launch.py ${LAUNCH_OPTIONS} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash -e | ||
|
||
ros2 run joy joy_node --ros-args --params-file $SNAP_COMMON/joy_params.yaml | ||
|
||
# # Retrieve the namespace using snapctl | ||
# NAMESPACE="$(snapctl get ros.namespace)" | ||
|
||
# # Check if NAMESPACE is not set or is empty | ||
# if [ -z "$NAMESPACE" ]; then | ||
# # No namespace is set, run the launch command without the namespace argument | ||
# ros2 launch teleop_twist_joy teleop-launch.py \ | ||
# config_filepath:=$SNAP_COMMON/joy_teleop.config.yaml | ||
# # ros2 launch teleop_twist_joy teleop-launch.py | ||
# else | ||
# # Namespace is set, include it in the launch command | ||
# ros2 launch teleop_twist_joy teleop-launch.py \ | ||
# config_filepath:=$SNAP_COMMON/joy_teleop.config.yaml --ros-args -r __ns:=/$NAMESPACE | ||
# # ros2 launch teleop_twist_joy teleop-launch.py --ros-args -r __ns:=/$NAMESPACE | ||
# fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
joy_node: | ||
ros__parameters: | ||
dev: "/dev/input/js0" # Replace with your joystick device | ||
deadzone: 0.1 | ||
autorepeat_rate: 20.0 | ||
# dev_ff: "/dev/input/event18" # based on evtest |
Oops, something went wrong.