Skip to content

ADVRHumanoids/modular_hhcm

Repository files navigation


Logo

modular

Redefining flexible automation.
View Demo · Request Feature · Report Bug
Explore the docs »

Build Status

Table of Contents
  1. About The Project
  2. Installation
  3. Usage
  4. Docs
  5. Roadmap
  6. Contributing
  7. Contact

About The Project

This project focuses on the development of an app for rapid model generation of modular robots, starting from a set of basic robotic modules. This app will genereate URDF, SRDF and a complete ROS package, which can be used to simulate and control the robot.

reconfigurable_pino

This is handled in 2 different scenarios: online or offline.

In the offline approach (Building Mode), a user sets up a robot with our reconfigurable modules in the virtual environment: the user selects modules from a library, assembles them to form a mechanism that is immediateley visualised in 3D.

An online approach (Discovery Mode) is also provided that allows the user to query the EtherCAT master for a description of the network topology graph. The robot built from real physical modules is therefore recognized and displayed in 3D.

Moreover, a Python API to programmatically build a robot model from a Python script is also provided. Some example of how to use the API are provided in the scripts directory. For using the Python API install with Option 1

Installation

Currently we only support Python3 (for the last version supporting Python2 see v.0.0.4) and it's recommended to have pip version 21.3 or newer if you plan use editable installs (see below).

There are 2 ways to install modular:

Option 1. pip install

  1. Get the code. Clone the repo using: git clone --recursive git@github.com:ADVRHumanoids/modular_hhcm.git. This will ensure the git submodule modular_resources is correctly initialized and cloned. (In alternative you can run git submodule update --init --recursive from the top directory after cloning)

  2. Install. After cloning the repo, from the main directory run: pip install . The package can be installed in system, local, or virtualenv site-packages directory. If you plan to make modifications it and don't want to re-install it every time, install it in 'editable mode' : pip install -e .

Option 2. Use the binaries

Get the RobotBuilder app from the latest release and make it executable (chmod +x RobotBuilder).

Usage

Configs

Several configurations can be modified for each deployment by creating a config file src/modular/web/web_config.ini. The most important ones are:

[MODULAR_API] # Mandatory section

# version of the API
version = 1

# When deploying the robot, return a zip file with the generated ROS package
download_on_deploy = true

# Use flash sessions to have multiple users on a single server
enable_sessions = true

# secret_key is used to sign the session cookie, it should be a random string
secret_key = FOO_BAR_BAZ

# base_route adds a prefix to all API routes, it is best to leave it commented
# base_route = /linfa/api/v${MODULAR_API:version}/modular

Run the GUI

To use modular you need to start the python server.

  1. If you installed with pip install:
python modular/src/modular/web/RobotDesignStudio.py

or even better, run:

robot-design-studio

Note: You might need to modify the PATH ;)

  1. If you instead use the binaries: run
./RobotBuilder

Then open http://0.0.0.0:5000/ from a browser to acces the graphical interface.

Use the python API

Examples of how to use the python API are provided in the scripts folder.

  • create_modularbot.ipynb shows an example of how to build a 6-DOF robot using Alberobotics modules and deploy URDF, SRDF, etc. into a ROS package
  • generate_concert_robot.ipynb shows how to build and deploy the CONCERT modular robot

Documentation

Static documentation for API calls has been added and is stored in the modular/src/modular/web/docs directory. It can be accessed locally as follow:

  1. clone the repo and navigate to the docs folder:

    git clone git@github.com:ADVRHumanoids/modular.git
    cd modular/src/modular/web/docs
  2. start a local python HTTP server:

    python -m http.server
  3. open http://0.0.0.0:8000/ from a browser

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

Alberobotics team - alberobotics@iit.it

Project Link: https://github.com/ADVRHumanoids/modular_hhcm