Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dehann/ppar
https://github.com/dehann/ppar
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/dehann/ppar
- Owner: dehann
- License: mit
- Created: 2014-07-11T21:02:15.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-14T03:25:05.000Z (over 10 years ago)
- Last Synced: 2023-08-12T14:27:40.245Z (over 1 year ago)
- Language: Python
- Size: 172 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
PPAR
====Basically an LCM wrapper for querying values from a json file. The initial purpose of this little project is to standardize parameter distribution amount multiple projects.
Write your parameters in human readible json file format, point the pparService.py at this file and querying the json file will be available over LCM. This prevents me from hardcoding parameters over and over in several scirps or projects -- especially in different languages.
At present there is little error checking and robustness built into this code -- will be added as dependcy on ppar grows in the future.
Dependencies
------------::
sudo apt-get install cmake python
MIT LCM must also be installed:::
cd ~/Downloads
wget http://lcm.googlecode.com/files/lcm-1.0.0.tar.gz
tar xzf lcm-1.0.0.tar.gz
cd lcm-1.0.0
./configure
make -j
sudo make install
sudo ldconfig
Installing
----------To get the code:
::
cd ~
git clone https://github.com/dehann/PPAR.git
cd PPAR
mkdir build
cd build
cmake ..
makePython path variable must include
::
??/PPAR/build/include/lcmtypes/ppar
and the lcm functions, please see LCM documentation
Running the service
-------------------At present the python program runs directly from in src directory, which isn't great, but this has been a quick turnaround little project -- more later...
::
cd PPAR/src
python pparService.py ??/some_param_file.jsonThe json file
-------------At minimum, the json file should include the LCM channel names with which requests and replies will be sent. For example, you'll see data/example.json has at least:
::
{
"ppar" : {
"lcm" : {
"reply-channel" : "PPAR_REPLY_EXAMPLE",
"request-channel" : "PPAR_REQUEST_EXAMPLE"
}
}
}