Wiki
Clone wikiscl-manips-group / docu / additional_controllers
Creating your custom controller(s)
- You may implement additional what we call "tasks" for your controller. A task may range from controlling one hand to controlling all the joints. The definition is somewhat expansive, but it allows you to control any subset of the robot.
- To implement a controller:
$ cd <scl_base_dir>/applications_linux $ sh create_new_ctrl.sh <your-name-all-small-letters> <your-controller-name>
- This will:
- Stash all your current code changes (you can un-stash them later by typing 'git stash pop')
- Create a new git branch for your controller
- Create a folder named 'scl_your_name_ctrl', and copy over the example controller there
- Rename all the files etc. from example to your controller name
- Compile your new controller
- Once all that is done, your controller will be a copy of the example controller, with a few TODOs. You can fill in the TODOs according to your controller implementation.
Applying your custom controller to a robot
- Please look at the Puma config file in your new controller folder. You will see your control task already added to the list.
- You may create similar config files for any robot. Just copy paste the config file from '<scl_base_dir>/specs/<robot-name>/' into your directory and edit it.
$ cd scl_manips_group.git/applications_linux/scl_samir_ctrl $ cp ../../specs/Pr2/Pr2Cfg.xml ./Pr2CfgSamirMod.xml $ gedit ./Pr2CfgSamirMod.xml &
- The controllers are specified with xml that is human readable so go ahead and change what you want! :-)
Updated