Difference between revisions of "HamsterPython"
From cogniteam
(33 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{DISPLAYTITLE:Hamster Python API}} | ||
+ | [[Category:Hamster]] | ||
+ | |||
=== Python setup === | === Python setup === | ||
− | * Note you are | + | * Note you are connected to the hamster_net (wifi / router) |
<syntaxhighlight lang="bash" line='line'> | <syntaxhighlight lang="bash" line='line'> | ||
Line 10: | Line 13: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | * If the Hamster is powered and your terminal is well configured you should be able to | ||
+ | See all data streams | ||
+ | <syntaxhighlight lang="bash" line='line'> | ||
+ | $ rostopic list | ||
+ | </syntaxhighlight> | ||
+ | See imagery from the robot | ||
+ | <syntaxhighlight lang="bash" line='line'> | ||
+ | $ rqt_image_view | ||
+ | </syntaxhighlight> | ||
− | + | * Install dependencies | |
− | * | ||
− | <syntaxhighlight lang=" | + | <syntaxhighlight lang="bash" line='line'> |
− | + | sudo apt-get install ros-kinetic-desktop ros-kinetic-ackermann-* | |
− | + | </syntaxhighlight> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | === Beginner tutorials === | ||
− | + | * Exercise 1 - [https://wiki.cogni.io/index.php/HamsterPythonExample1 | Process laser Scan ] | |
− | + | * Exercise 2 - [https://wiki.cogni.io/index.php/HamsterPythonExample2 | Process inertial measurement unit (IMU) ] | |
− | + | * Exercise 3 - [https://wiki.cogni.io/index.php/HamsterPythonExample3 | Move until collision ] |
Latest revision as of 09:21, 24 March 2019
Python setup
- Note you are connected to the hamster_net (wifi / router)
<syntaxhighlight lang="bash" line='line'>
$ export ROS_IP=<your IP>
</syntaxhighlight>
<syntaxhighlight lang="bash" line='line'>
$ export ROS_MASTER_URI=http://10.0.2.<HAMSTER AGENT Number>:11311
</syntaxhighlight>
- If the Hamster is powered and your terminal is well configured you should be able to
See all data streams <syntaxhighlight lang="bash" line='line'>
$ rostopic list
</syntaxhighlight> See imagery from the robot <syntaxhighlight lang="bash" line='line'>
$ rqt_image_view
</syntaxhighlight>
- Install dependencies
<syntaxhighlight lang="bash" line='line'> sudo apt-get install ros-kinetic-desktop ros-kinetic-ackermann-* </syntaxhighlight>
Beginner tutorials
- Exercise 1 - | Process laser Scan
- Exercise 2 - | Process inertial measurement unit (IMU)
- Exercise 3 - | Move until collision