A distributed digital manufacturing cell setup.
-
Clone ros_mtconnect_2 repository from MTConnect GitHub preferrably in the HOME directory.
cd ~
git clone https://github.com/mtconnect/ros_mtconnect_2.git
-
Update the
src/
path in thecollaborationModel
package inside thearchetypeToInstance.py
module (ln 5) accordingly. -
(User Preference) Update the adapter host and port information for the devices in
cell.py
module and inagent.cfg
file in theconfigFiles
directory of the ros_mtconnect_2 repository. -
Install the MTConnect Agent.
-
Follow instructions for installation and usage on
https://github.com/mtconnect/cppagent
-
Update adapter host, port and device file information for the devices in the
agent.cfg
of the MTConnect Agent as well. Or simply useagent.cfg
file in theconfigFiles
directory of the ros_mtconnect_2 repository with an updatedDevices
file path (ln 1). -
Update the agent device file of the Agent to be
combined.xml
which can be found indeviceFiles
directory.
Some of these steps might not be needed if the necessary python packages are already installed.
-
Open a terminal.
-
sudo apt install python-pip
-
pip install pipenv
-
cd ~/ros_mtconnect_2/simulator
There should be a file
Pipfile
here -
pipenv install -d
-
pipenv shell
This will launch the pip environment in the terminal
-
pip install transitions doublex requests mock mamba
-
Open a new terminal and in that terminal type:
killall pipenv
-
gedit ~/.bashrc
-
Add this line to the bottom:
export PYTHONPATH=\$PYTHONPATH:/usr/lib/python2.7/dist-packages
The setup can be tested before being run. Following are the steps to run the spec tests developed for the simulator behavior.
-
Make sure that necessary python dependencies are installed.
-
Goto the
spec/
directory.cd ~/ros_mtconnect_2/simulator/spec
use as is if repository cloned in the HOME directory.
-
Run:
mamba *
runs all the spec tests available for the different devices, collaboration models and interfaces state-machines and their behaviors.
To run the simulation follow the following steps:
-
Go to the
src/
directory of thesimulator/
. -
cd ~/ros_mtconnect_2/simulator/src
-
Run the MTConnect Agent with the updated configuration.
agent run ~/ros_mtconnect_2/simulator/src/configFiles/agent.cfg &
-
Run the
cell.py
module as follows:python cell.py
Check out https://github.com/mtconnect/ros_mtconnect_2_demo
Copyright 2018, VIMANA. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.