Sign inSign up

phm14/oscar

By phm14

Updated over 3 years ago

Image
0

168

phm14/oscar repository overview

Introduction

The following container ROS Services for Fiware-UI-Robot communication is needed to start up the ROS services for OSCAR which enable communication between Fiware, User Interface (UI) and the Robot. More in general OSCAR comprises the following modules:

1. CSV Parser
2. ROS Services for Fiware-UI-Robot
3. ROS Services for Kinect-Fiware
4. HoloLens UI application

In particular the CSV parser is needed to load the data of the component on Fiware. Fiware, along ROS, is used to enable communication and collection of data across the different devices. Finally the processed data are displayed to the operator through the UI application on HoloLens

Services

After running the ROS launcher the following services will be available:

/component_srv: get data concerning the component entity
/step_srv: get data concerning the step entity
/macrostep_srv: get data concerning the macrostep entity
/usecase_srv: get data concerning the use case entity
/step_status: update the step entity with actions performed by the operator
/robot_pose: get data concerning the robot position and load to Fiware
/switch_srv: issue commands to the robot

Requirements

CSV Data

Files containing data must be in csv format, using the comma , delimiter. As for now csv data is split among the following files:

Component.csv
Step.csv
Macrostep.csv
UseCase.csv

where the entity UseCase contains one or more entities Macrostep, which, in turn contain one or more entities Step.

  • The first row of the csv tables contains the attribute name (first letter in lowercase) and in the case of relationship attributes their name convention must follow the rule: name_of_attribute = 'ref' + name_of_external_entity. So if, for example, an entity Step has an attribute linking to the Component entity the name of the attribute must be refComponent.

  • The second row must contain the type of the attribute, the type of the first column containing the id must be of type None, while the relationship attributes must be of type Relationship

Start Fiware

Only the first time execute the command:

docker network create fiware_default

then run the containers for mongo and orion:

docker run -d --name=mongo-db --network=fiware_default   --expose=27017 mongo:4.2 --bind_ip_all
docker run -d --name fiware-orion -h orion --network=fiware_default   -p 1026:1026  fiware/orion -dbhost mongo-db

Load data

To load data on Fiware execute the command:

python parser_to_fiware.py

the script file must be on the same folder of config.yml file to work

Instructions

To run the container execute the command

docker run --ipc=host  -it  phm14/oscar

Make sure that in the file config.yaml inside the folder src/oscar_core the entities address field entities_address: http://IP_ADDRESS:PORT_NUMBER/v2/entities/ is correct:

nano src/oscar_core/config.yml

and change accordingly entities_address: http://IP_ADDRESS:PORT_NUMBER/v2/entities/

Inside the container run the following:

source install/setup.bash
ros2 launch bring_up bring_up_launch.py

Testing

Inside the container run the following:

source install/setup.bash
ros2 launch parser parser_launch.py

To check if services are running launch another session from the same container:

docker exec -it <container_id> bash

inside the new session source ros:`

source install/setup.bash

To visualize data launch the command:

ros2 run parser ficlient TYPE ID

where TYPE can be one of the following values component, step, macrostep, usecase depending on the entity and ID is the same value found on the input csv files.

Note

When launching the command ros2 launch bring_up bring_up_launch.py the services managing the robot are executed, to work the robot must be connected to the host.
The command ros2 launch parser parser_launch.py allow to launch services which communicate with Fiware, in particular entities can be printed on screen using the ficlient node.

Tag summary

Content type

Image

Digest

sha256:ee02190a9

Size

979.5 MB

Last updated

over 3 years ago

docker pull phm14/oscar