Code Monkey home page Code Monkey logo

acutronicrobotics / hrim Goto Github PK

View Code? Open in Web Editor NEW
65.0 25.0 23.0 1.14 MB

An information model for robot hardware. Facilitates interoperability across modules from different robot manufacturers. Built around ROS 2.0

Home Page: https://acutronicrobotics.com/technology/hrim/

License: Apache License 2.0

Python 92.51% Dockerfile 0.21% Shell 2.73% CMake 2.42% TeX 2.13%
robotics robots ros robotic-modules infrastructure communication manufacturer ros2 standard hal4rt

hrim's Introduction

Build Status PyPI version CodeFactor

Hardware Robot Information Model (HRIM)

The Hardware Robot Information Model or HRIM for short, is a common interface that facilitates interoperability among different vendors of robot hardware components with the purpose of building modular robots. HRIM focuses on the standardization of the logical interfaces between robot modules, designing a set of rules that each device has to meet in order to achieve interoperability.

Real world implementations requires taking into account the common hardware modules used in robotics. The robot modules have been classified in 7 types of devices: sensor, actuator, cognition, communication, power, ui and composite. Each type is composed by sub-types or devices related to the functionality of the module. For example, a camera is a sub-type of the sensor type and represented with the following structure:

generated/
...
├── sensor
│   ├── camera
│   │   ├── hrim_sensor_camera_msgs
│   │   │   ├── CMakeLists.txt
│   │   │   ├── msg
│   │   │   │   ├── Audio.msg
│   │   │   │   ├── CameraInfo.msg
│   │   │   │   ├── CompressedImage.msg
│   │   │   │   ├── Image.msg
│   │   │   │   ├── PTZ.msg
│   │   │   │   └── Reconfiguration.msg
│   │   │   └── package.xml
│   │   ├── hrim_sensor_camera_srvs
│   │   │   ├── CMakeLists.txt
│   │   │   ├── package.xml
│   │   │   └── srv
│   │   │       ├── SetCameraInfo.srv
│   │   │       └── SpecsCamera.srv
│   │   ├── mandatory_parameters.yaml
│   │   └── optional_parameters.yaml
...

A preliminary whitepaper about this work is available at https://arxiv.org/abs/1802.01459. Please use the following BibTex entry to cite our work:

@article{hrim,
  title={An information model for modular robots: the Hardware Robot Information Model (HRIM)},
  author={Zamalloa, Irati and Muguruza, Iñigo and Hernández, Alejandro and Kojcev, Risto and Mayoral, Víctor},
  journal={arXiv preprint arXiv:1802.01459},
  year={2018}
}

Installation

Through pip:

pip3 install hrim

Local install through pip:

# while positioned at the repository's root
pip3 install -e installator

Manually running the installator:

# while positioned at the repository's root
cd installator
sudo python3 setup.py install

Script usage

Commands should be executed from the repository's root

The command structure would be the following:

hrim [-h] [-p {ros2}] {generate,compose,compile,list,clear} filePath [filePath ...]

Where:

-h/--help shows script's help.

-p/--platform should be followed by which platform (e.g. ROS 2) to generate the implementation in. Current valid values are:

  • ros2

{generate,compose,compile,list,clear} is mandatory and signifies the action to take:

  • generate: generates the corresponding packages/files to use with the selected platform (ROS 2 by default). The generated files will be located inside a generated directory on the root of the repository. It expects either the path to a valid XML model or one of the following shorthands:
    • all: generates the implementation of all models.
    • actuators: generates the implementation of every existent actuator models.
    • composites: generates the implementation of every existent composite models.
    • powers: generates the implementation of every existent power models.
    • sensors: generates the implementation of every existent sensor models.
  • compose: meta-model composition. Generates a composition of models from the passed models in the repository's root, named model.xml. It expects one or more models to make a composition from, in a type/subtype or type/subtype/model (without the file extension) format. You can get a list of all valid models making use of the list models function.
  • compile: meta-model package generation. Generates the corresponding packages/files based on the passed model composition file.
  • list: lists either:
    • models: all existing component models.
    • implementations: all generated implementations on the generated directory.
  • clear: deletes implementations from the generated directory. It expects either the relative path from said folder to delete (i.e. sensor/imu will delete generated/sensor/imu, sensor will delete all generated sensor implementations) or all to delete all generated implementations (doesn't include compositions).

For further information on the model composition process, refer to our documentation.

Examples

While positioned at the repository's root all of the following are valid command executions:

  • hrim generate $(pwd)/models/sensor/torque/torque.xml
  • hrim generate ./models/sensor/torque/torque.xml
  • hrim -p ros2 generate /models/sensor/torque/torque.xml
  • hrim generate models/sensor/torque/torque.xml
  • hrim generate --platform ros2 all
  • hrim list models
  • hrim list implementations
  • hrim clear all
  • hrim clear sensor/imu
  • hrim clear sensor
  • hrim compose composite/arm sensor/imu actuator/gripper/gripper sensor/3dcamera/3dcamera_stereo
  • hrim compile model.xml
  • hrim compile validComposition.xml

rosin_logo

Supported by ROSIN - ROS-Industrial Quality-Assured Robot Software Components. More information: rosin-project.eu

eu_flag

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement no. 732287.

hrim's People

Contributors

abilbaotm avatar ahcorde avatar ibaiape avatar izamalloa avatar landeru avatar nzlz avatar rosin-review avatar vmayoral avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hrim's Issues

3D Cameras

An optical instrument that provices a 3D reading about the environment. I differentiate three types: Depth sensor, Stereo camera and ToF camera. As they have been categorized according the hardware each one as to have its own Specs<device_name>.msg.

Create:

  • SpecsDepthSensor.msg

  • SpecsStereoCamera.msg

  • SpecsToFCamera.msg

HRIM DC motors model

DC motors are among the most common type of motors used.

Obj: Design the HRIM DC motors model.

Steps:

  • Market analysis, devices and datasheets.

  • DC motors main purpose.

  • Mandatory topics, messges and so on.

  • Optional topics, messges and so on.

  • Github

  • Docs

Update travis-ci

Describe the feature that you would like to include:
Update travis to latest ROS2 version

Additional context
NONE

Torque sensor

Torque sensors messages have to be modified:

  • Specs: rightnow it doesn´t report enough information. For example, axes amount, precision or security factor.
  • Torque: Units? the torque has to be reported in Nm
    @ibaiape we will work together on this.

HRIM command line tool

Describe the feature that you would like to include:
I would like to have a hrim command line tool. I will start working on it and I'll create a PR to be verified.

Additional context
NONE

HRIM Arm model

Improve the Robotics Arm Model (Composite - Arm):

  • Add joint_name to RotaryServomotors.

  • Add JointStatus.msg to Arm.

  • Add MoveCommand.srv to Arm.

  • Add TrayectoyCommand.srv to Arm.

  • Add RobotStatus.msg to Arm.

Broken links - Missing Files

Broken links and missing files from docs

ie https://acutronicrobotics.com/docs/technology/hrim/model/implementations/actuator/rotary%20servomotor

has a link like

https://github.com/erlerobot/HRIM/blob/master/actuator/RotaryServo/hrim_actuator_rotaryservo_msgs/msg/GoalRotaryServo.msg

IE 404 error

Any links to the former blob directory path and beyond from your website doc links now breaks all your links from your website to the support file links and you have lots links that have 404 page errors

you might want to fix that as it makes it hard to follow along

Error compiling hrim_qa

Describe the bug
When compiling HRIM I get following error in hrim_qa package:

Starting >>> hrim_qa
--- stderr: hrim_qa                           
CMake Error at CMakeLists.txt:29 (SUBDIRLIST):
  SUBDIRLIST Macro invoked with incorrect arguments for macro named:
  SUBDIRLIST


---
Failed   <<< hrim_qa	[ Exited with code 1 ]

To Reproduce

  • Follow ROS2 installation instructions from sources (Dashing)
  • Clone HRIM repo in src folder and generate the models
  • colcon build --symlink-install --merge-install

Expected behavior

  • I expected to compile whole ws without errors

HRIM model of linear actuators?

I am curious how to best use HRIM for something like multiple axis linear actuators. For example, three linear actuators may be stacked on top of each other to construct an XYZ stage. Each linear actuator may be driven in a variety of ways, perhaps by a stepper motor, or a servo motor with an encoder, or a linear motor with an encoder. There may be two limit switches and a home switch for every axis. Each axis may be driven in either position mode, accelerating and decelerating to a target position, or in a velocity mode, where it just accelerates to a target velocity until it receives a new command. Target positions may be absolute with respect to the home switch or relative with respect to the current position. The number of axes might be variable. Would you consider a linear actuator a composite device or a basic actuator type or is that an example of an electric motor actuator? Is there a way to translate units to account for gearboxes or rotary to linear mechanisms or microstep counts?

How to generate the MARA HRIM interface?

Hi,
I have downloaded the MARA simulation and HRIM generated packages for messages.

I can see that in the generated directory, there are all the message packages required to make MARA run using the HRIM interface (generic, geometry, gripper, rotaryservo). However, if I have correctly understood, those packages have been generated by compiling the XML files that define the MARA interfaces, using the command:
python3 hrim.py generate <some_xml_file>

Where can I get those XML files? They will be very useful for me in order to better understand how to create my own.

MARA dependencies

After the last update of HRIM some dependencies required by MARA have disappeared, making MARA unusable.

hrim_generic_msgs
hrim_actuator_rotaryservo_msgs

I will try to take a look at the new HRIM and update MARA. In the meantime, it would be a good idea to create a temporary branch (mara) with the previous version of HRIM.

Communication

To include communication we will have to create a new generic msg (all the components have to include).

Improve HRIM module error management

Describe the feature that you would like to include:

This is an open discussion on order to extend HRIM error management.

Additional context

Currently errors in HRIM are just a subfield on certain topics. There is not a common way to deal with errors for all the components. For instance, in the case of HRIM/models/actuator/servo/topics/state.xml the error are specified in field called fault with the following faults:

  • "FAULT_NONE": 0
  • "FAULT_CURRENT": 1
  • "FAULT_TEMPERATURE": 2
  • "FAULT_BUS_VOLTAGE": 3
  • "FAULT_BRIDGE_DRIVER": 4

It would be good to have a common definition of error that can be shared by all modules. In this way, error management could be consistent for different types of modules. The error semantic would be different for each component, but not the structure. That means that I can call the same function in order to retrieve the error for an actuator or a gripper.

I propose to follow a structure similar to the one used in CMM machine standard language (I++ DME (Dimensional Measurement Equipment) | NIST) (chapter 8 Error Handling):


captura de pantalla 2019-02-27 a las 9 00 15


In this implementation the error is composed by:

  • A severity code (F1)
  • A code defined inside the standard (F2). This could be an error defined in HRIM.
  • Native error code (F3). An error code which is provided each component vendor. i.e: 0x0080 (Position following error).
  • A string describing the error.

Apart from the message structure we would need to define an error classification for each component type. Some error codes could be common for all modules (i.e: communications failure, generic, wrong parameter, etc..) and other specific for each module type.

Add acceleration in StateRotaryServo

Describe the feature that you would like to include:

I would like to include an acceleration field in StateRotaryServo. Something like this:

 <property name="acceleration" type="float64" unit="radians per second squared" description="current acceleration ">

Discussion around modular robots

Hi,

This is a thread to share and discuss together our experiment and vision about modular tools for roboticists as planned with @vmayoral.

Who am I ?

I'm CEO at Luos robotics: www.luos-robotics.com
At Luos we create modular tools for roboticists and we target mass produced robots. We recently discovered your amazing work, and our solution is REALLY close to HRIM (and HROS I guess).
We are aware of open-source (we once created this project: https://www.poppy-project.org) but unfortunately we don't use it a lot for now at Luos.

What are the big chalenges that modular robots will have to face?

I think we have a common interest of enabling modular robots market.
From our point of view, biggest challenges are:

  • Education: We have to make developers aware of our way of thinking. To do that, we have to explain the differences and benefits with the traditional way, and we have to make easy-to-use and easy-to-understand documentation.
  • Price: Modular technologies are absolutely great for prototyping because they save a lot of time and make it reachable for less technical persons, but it's expensive. To keep it on the final product, we have to reduce the cost of the hardware needed for modulrarity.

About HRIM

We love the HRIM initiative, we planed to do something similar by ourselves, but it's better if the movement is already existing. It could be a good start to create something that everyone can use and benefit to.
We would like to brainstorm with you about it because having different points of view could make HRIM the obvious way for robots and I think we could be HRIM-compatible.
I am not really familiar with this kind of brainstorm on Github Issue (usually we use our forum to do it) but I can deal with it ;)

About us

We have something pretty similar to HRIM running on our products and we have customers that use it every day. We transmit and share our "HRIM like" data between modules using RS485 and a daisy chain link allowing us to detect topology of the network. The protocol and the physical way to transmit is called Robus. We can run Robus on any microcontrolers; at the begining we used 8bit microcontrolers. Now we have a "mother board" called L0 (Quite similar to your SoM) with an ARM cortexM0 on it.
To link the network to a computer we use communication modules as gateways. These modules transform our "HRIM like" data into JSON and reverse.

Currently, our users only deal with JSON on the computer side (some of them use it with ROS).
More information is available on our doc: https://www.luos-robotics.com/en/documentation/general-use/

HRIM GPS model

Obj: Design the HRIM GPS model.

Steps:

  • Device analysis, Global Positioning System (GPS) : a receiver that calculates geographical location by satellites.

  • GPS main purpose.

  • Market analysis.

  • Design the topics, messges and so on, with the interoperability in mind.

  • Github

  • Docs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.