DatawoodGH is a library of grasshopper components made for the Datawood project at the robotlab Hva. It includes five grasshopper components and a RAPID file for the ABB robots at the lab. The grasshopper components are:
Table of Contents
For basic usage of the grasshopper components download the latest release. Before unzipping the release.zip right clickt it, click on properties and check the unblock box. Now you can unzip the release.zip file into your grasshopper libraries folder. When running grasshopper you should be able to see the components underneath the datawood tab.
In this chapter we'll explain how you can get the project to run and do a simple scan and get some data into the csv file.
Before running the datawood project grasshopper file you'll have to install the following programs:
- Rhino3d
- jSwan download the zip file *1
- Woodintake follow the readme instructions and run the server.
- Download the DatawoodGH release.zip *1
*1 right click > properties > check unblock and extraxt the zip file in the C:\Users\"USERNAME"\AppData\Roaming\Grasshopper\Libraries folder.
Download the gh file and open it with grasshopper. Change the ip adresses to the correct robots and servers. Make sure the servers are running for the weightscale and the color camera.
To run the socket client you'll need to put the Socket_Server.mod and Socket_Server.pgf on the robot that you want to control, and run that file. In grasshopper you'll have to enter the ip(10.0.0.12 or 10.0.0.13) of the robot(Make sure this ip is also in the Socket_server.mod file) and the port by default this is 1025. You also have to give the path to the rapid file you want to send over to the robot. The socket client only reads out the following commands from the given rapid file: MoveL, MoveAbsj, setDO and waittime.
The pcd converter is used to convert the .pcd file to a .txt(required for grasshopper and javid's script) file and remove lines below a given z value and lower the resolution by choosing how many lines you want to keep (if you want to keep every 10th line set nstep to 10), this can reduce the file from 1000000 to 3000 lines.
The API call is used to make a post or a get call to a given endpoint and gets a json return value. This is done to get data from the raspberrypi's (scale and camera use get), or to control the trispector via a post call.
The FTP component is used to establish an ftp connection, in our case this is mainly used to get the picture from the raspberrypi controlling the camera. It requires a PS path of the file you want to download, PC path where you want to download the file to.
The CSV component creates or appends to a csv file and writes a line based on the given parameters, this is done at the end of the process to create a database of woodenobjects.
To be able to contribute follow the tutorial.
More tutorials about custom grasshoper components can be found here.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Giel Jurriëns - [email protected]
Project Link: https://github.com/gieldid/datawoodgh