File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3 -i
2+
3+ # a simple Robotics Toolbox "shell", runs Python3 and loads in NumPy, RTB, SMTB
4+ #
5+ # Run it from the shell
6+ # % rtb.py
7+ #
8+ # or setup an alias
9+ #
10+ # alias rtb=PATH/rtb.py # sh/bash
11+ # alias rtb PATH/rtb.py # csh/tcsh
12+ #
13+ # % rtb
14+
15+ # import stuff
16+ from math import pi
17+ import numpy as np
18+ import matplotlib as plt
19+ import roboticstoolbox as rtb
20+ from spatialmath import *
21+ from spatialmath .base import *
22+
23+ # setup defaults
24+ np .set_printoptions (linewidth = 120 , formatter = {'float' : lambda x : f"{ x :8.4g} " if abs (x ) > 1e-10 else f"{ 0 :8.4g} " })
25+ SE3 ._ansimatrix = True
26+
27+ # print the banner
28+ # https://patorjk.com/software/taag/#p=display&f=Cybermedium&t=Robotics%20Toolbox%0A
29+ print (r"""____ ____ ___ ____ ___ _ ____ ____ ___ ____ ____ _ ___ ____ _ _
30+ |__/ | | |__] | | | | | [__ | | | | | | |__] | | \/
31+ | \ |__| |__] |__| | | |___ ___] | |__| |__| |___ |__] |__| _/\_
32+
33+ for Python
34+
35+ """ )
You can’t perform that action at this time.
0 commit comments