techmanpy
is an easy-to-use communication driver for Techman robots written in Python.
With it, motion commands can be executed, internal parameters can be changed and the state of the robot can be monitored: providing a solid foundation for any custom (ROS) control software.
By using asyncio
for all socket communications, it provides an elegant coroutine-based API.
Here's how to command your robot to move:
#!/usr/bin/env python
import asyncio
import techmanpy
async def move():
async with techmanpy.connect_sct(robot_ip='<robot IP address>') as conn:
await conn.move_to_joint_angles_ptp([10, -10, 10, -10, 10, -10], 0.10, 200)
asyncio.run(move())
And here's how to listen to the TMFlow server:
#!/usr/bin/env python
import asyncio
import techmanpy
async def listen():
async with techmanpy.connect_svr(robot_ip='<robot IP address>') as conn:
conn.add_broadcast_callback(print)
await conn.keep_alive()
asyncio.run(listen())
TMFlow: 1.80+
Python: 3.8+
$ python3 -m pip install techmanpy
To verify that your connection with the robot is all set-up:
$ python3 test_connection.py <robot IP address>
Bug reports, patches and suggestions are welcome! Feel free to open an issue or send a pull request.
techmanpy
is not affiliated, authorized, or in any way officially connected with Techman Robot. Use this software at your own risk, it did not undergo any official quality assurance.
This package is released under the MIT license.