BerkeleyExpertSystemTechnologiesLab / 2d-spine-control-hardware

Code for the test setup for the 2D tensegrity spine vertebra. Includes ROS / computer vision, code for the PSoC microcontroller, and controller calculations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2d-spine-control-hardware

Code for the test setup for the 2D tensegrity spine vertebra. Includes ROS / computer vision, code for the PSoC microcontroller, and controller calculations.

Usage:

For writing the PSoC code - use PSoC creator. No particular instructions there. This repo has a nice .gitignore so you can open the workspace directly in this subfolder.

For ROS / actually operating the test:

Writing the inverse kinematics commands: do the following, in order. Be sure to source devel/setup.bash in each.
	1) Plug in the PSoC and run >> dmesg. Look for the device name. You'll see a line like
		"ttyACM0 : USB ACM Device"
		the name of the PSoC device file is /dev/ttyACM0 in this case. Sub in below if different.
	2) open a new terminal >> roscore
	3) open a new terminal >> rosrun spine_controller serial_rx_echo.py /dev/ttyACM0
	4) open a new terminal >> rosrun spine_controller serial_tx_fromtopic.py /dev/ttyACM0 invkin_tx_commands
	5) open a new terminal >> rosrun spine_controller invkin_tx_totopic.py path-to-data-file

	For the last line, an example would be, if you're in the ...spine_controller/src directory,
	>> rosrun spine_controller invkin_tx_totopic.py ../data/invkin_results_2d_28-Nov-2018_15-25-20.csv 

	You'll see output in the serial_rx_echo window.
	To shut down: Ctrl-C in each window, in the reverse order of startup.
	To manually control the PSoC / send it commands, at any time, open another terminal and source devel/setup.bash, then
		>> rosrun spine_controller serial_tx_cmdline.py /dev/ttyACM0
		(hint: sending 'w' prints a welcome message from the PSoC w/ list of commands.)

About

Code for the test setup for the 2D tensegrity spine vertebra. Includes ROS / computer vision, code for the PSoC microcontroller, and controller calculations.

License:Apache License 2.0


Languages

Language:Python 36.0%Language:Jupyter Notebook 13.1%Language:MATLAB 12.5%Language:Common Lisp 9.2%Language:C 7.9%Language:CMake 7.5%Language:C++ 6.1%Language:HTML 3.5%Language:JavaScript 3.0%Language:Shell 1.1%