Skip to content

Commit

Permalink
TMR 2024 developments (#41)
Browse files Browse the repository at this point in the history
Developments for TMR
  • Loading branch information
afr2903 authored Apr 26, 2024
2 parents 13de455 + 9bb912a commit ef4f543
Show file tree
Hide file tree
Showing 22 changed files with 1,801 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ build
devel
terminator-config
.catkin_workspace
__pycache__
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "navigation"]
path = navigation
url = https://github.com/RoBorregos/home-navigation.git
[submodule "ws/src/interfaces"]
path = ws/src/interfaces
url = https://github.com/RoBorregos/home-interfaces
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Current development of [RoBorregos](www.roborregos.com), for the RoboCup @HOME competition, in the Open League Platform (OPL). The goal is to built a service robot capable of accomplishing tasks in domestic applications. The software areas being developed are: Human-Robot Interaction and Cooperation, Object Manipulation, Computer Vision, and Navigation and Mapping.

This repository features the `main_engine` package, in charge of managing Behavior Integration with all the areas.
This repository features the `task_manager` package, in charge of managing Behavior Integration with all the areas.
For more information on the project, check our [documentation](https://docs.rbrgs.com/home/).

## Setup
Expand Down Expand Up @@ -71,6 +71,26 @@ make main.remove
```

Additional commands can be added within the Makefile and the scripts inside the `docker/scripts` folder can help for easier integration and sharing. These include a build script to run the dockerfile and create a new image and a run script to create containers from it. Any additional dependency or system/environment configuration should be added to these scripts.

## Task manager

The `frida_task_manager` is the central package in charge of processing the command information and directing the tasks with its respective area. For code readability, each area development its inside a Python module `area_tasks.py`, and they are called by `task_manager_server.py`, the script were the ROS node is created.

At the top of this mentioned file, there are four constants to enable or disable the tasks, you can change any of these to `False` is for the current test there is no need of an area:
```python
NAV_ENABLED = True
MANIPULATION_ENABLED = True
CONVERSATION_ENABLED = True
VISION_ENABLED = False
```

For executing the `task_manager`, follow the above steps of [Docker setup](#Docker%20Development). Inside the `bash` terminal, setup the ROS network and execute the node:
```bash
export ROS_MASTER_URI=http://192.168.31.23:11311 # IP of the ROS Master (if master is in another machine)
export ROS_IP=192.168.31.97 # IP of own machine
rosrun frida_task_manager task_manager_server.py
```

## Team Members

| Name | Github | Role |
Expand All @@ -84,6 +104,6 @@ Additional commands can be added within the Makefile and the scripts inside the
| Marina Villanueva | [@mariinaVillanueva](https://github.com/mariinaVillanueva) | HRI |
| David Vázquez | [@Deivideich](https://github.com/Deivideich) | Electronics, Navigation & Manipulation |
| Diego Hernández | [@Diego-HC](https://github.com/Diego-HC) | Navigation |
| Franciso Salas | [@Francisco-SP3](http://github.com/Francisco-SP3) | HRI |
| Franciso Salas | [@Francisco-SP3](http://github.com/Francisco-SP3) | HRI, Navigation |
| Leonardo Sánchez | [@LeoLFSH](https://github.com/LeoLFSH) | Mechanics |
| Alex Guerrero | [@]() | Mechanics |
| Alex Guerrero | [@alex-guerreroc](https://github.com/alex-guerreroc) | Mechanics |
39 changes: 39 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: '2.25'

services:
rosmaster:
build:
context: .
dockerfile: docker/Dockerfile.main
container_name: rosmaster
hostname: rosmaster
networks:
- rosdocker
ports:
- "11311:11311"
command: roscore

main:
build:
context: .
dockerfile: docker/Dockerfile.main
container_name: task_manager
hostname: task_manager
volumes:
- ./ws:/workspace
- /tmp/.X11-unix:/tmp/.X11-unix
- /var/run/docker.sock:/var/run/docker.sock
- /dev:/dev
networks:
- rosdocker
privileged: true
devices:
- /dev/video0:/dev/video0
environment:
- "ROS_HOSTNAME=task_manager"
- "ROS_MASTER_URI=http://rosmaster:11311"
- DISPLAY=${DISPLAY}
- LOCAL_USER_ID=id -u ${USER}
- LOCAL_GROUP_ID=id -g ${USER}
- LOCAL_GROUP_NAME=id -gn ${USER}
command: bash -c "source /ws/devel/setup.bash && rosrun frida_task_manager receptionist_task_manager.py"
5 changes: 4 additions & 1 deletion docker/Dockerfile.main
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ RUN apt-get update -qq && apt-get install -y build-essential \
ffmpeg libsm6 libxext6 autoconf libtool mesa-utils \
terminator nano git wget curl iputils-ping \
libcanberra-gtk-module libcanberra-gtk3-module \
ros-dev-tools
ros-dev-tools \
ros-noetic-move-base-msgs \
ros-noetic-audio-common-msgs


RUN apt-get update && apt-get install -y ros-noetic-rqt ros-noetic-rqt-common-plugins

Expand Down
1 change: 1 addition & 0 deletions docker/scripts/run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ echo "Building docker image: $IMAGE_NAME"
echo "Container name: $CONTAINER_NAME"
echo "Volumes to mount: $VOLUME_COMMANDS"

#DOCKER_SPEECH_ARGS="-v /tmp/pulseaudio.socket:/tmp/pulseaudio.socket -v /tmp/pulseaudio.client.conf:/etc/pulse/client.conf --device /dev/snd:/dev/snd"
DOCKER_COMMAND="docker run"

xhost +
Expand Down
18 changes: 18 additions & 0 deletions docker/scripts/speech.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Create pulse audio socket to share with docker container

# Ref: https://github.com/mviereck/x11docker/wiki/Container-sound:-ALSA-or-Pulseaudio

# Remove files if they exist
sudo rm -rf /tmp/pulseaudio.socket
sudo rm -rf /tmp/pulseaudio.client.conf

# Create pulseaudio socket.
pactl load-module module-native-protocol-unix socket=/tmp/pulseaudio.socket

# Create pulseaudio clients config.
echo 'default-server = unix:/tmp/pulseaudio.socket
# Prevent a server running in the container
autospawn = yes
daemon-binary = /bin/true
# Prevent the use of shared memory
enable-shm = false' > /tmp/pulseaudio.client.conf
2 changes: 1 addition & 1 deletion hri
Submodule hri updated 343 files
2 changes: 1 addition & 1 deletion manipulation
Submodule manipulation updated 243 files
2 changes: 1 addition & 1 deletion navigation
Submodule navigation updated 434 files
2 changes: 1 addition & 1 deletion vision
Submodule vision updated 105 files
50 changes: 50 additions & 0 deletions ws/src/frida_task_manager/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
cmake_minimum_required(VERSION 3.0.2)
project(frida_task_manager)

find_package(catkin REQUIRED COMPONENTS
actionlib
geometry_msgs
roscpp
rospy
std_msgs
move_base_msgs
)

## Generate messages in the 'msg' folder
# add_message_files(
# FILES
# Message1.msg
# Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )

## Generate actions in the 'action' folder
# add_action_files(
# FILES
# Action1.action
# Action2.action
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
# DEPENDENCIES
# geometry_msgs# std_msgs
# )

catkin_package(
# INCLUDE_DIRS include
# LIBRARIES frida_task_manager
# CATKIN_DEPENDS actionlib geometry_msgs roscpp rospy std_msgs
# DEPENDS system_lib
)

include_directories(
# include
${catkin_INCLUDE_DIRS}
)
37 changes: 37 additions & 0 deletions ws/src/frida_task_manager/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0"?>
<package format="2">
<name>frida_task_manager</name>
<version>0.0.0</version>
<description>The frida_task_manager package</description>

<maintainer email="[email protected]">rbrgs</maintainer>

<license>GPLv3</license>

<buildtool_depend>catkin</buildtool_depend>
<build_depend>actionlib</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>move_base_msgs</build_depend>
<build_export_depend>actionlib</build_export_depend>
<build_export_depend>geometry_msgs</build_export_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<build_export_depend>move_base_msgs</build_export_depend>
<exec_depend>actionlib</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>move_base_msgs</exec_depend>


<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->

</export>
</package>
Loading

0 comments on commit ef4f543

Please sign in to comment.