-
Notifications
You must be signed in to change notification settings - Fork 4
2 Raspberry & Spatula Encoder setup
OleguerCanal edited this page Dec 6, 2017
·
1 revision
0) Make sure both devices can ssh each other without the need of a password:
http://www.linuxproblem.org/art_9.html
1) At main PC: Edit Connections -> Simulate Robot Network -> IPv4 Settings (Manual, Adress: 192.168.37.2, Netmask: 24) & Disconnect and reconnect to Simulate Robot Network
2) At main PC: Terminal: nano /etc/hosts
add:
(raspberry pi 2 IP) (raspberry2 name)
ex:
192.168.37.5 raspberry2
(you can get the IP from the raspberry typing: sudo ifconfig at the raspberry terminal and looking at eth0)
3) At main PC: Terminal: export ROS_MASTER_URI=http://mcube-020:11311/ (maybe this should be changed in the arc_env.sh script)
4) At main PC: Go to /home/mcube/rgrasp/catkin_ws/src/apc_config/launch
4.1) Make sure robot_config.launch file has the raspberry2 options (if not, overwrite it with the one attached)
4.2) Make sure you have the updated versions of raspberry.launch & raspberry2.launch files in this folder too (here attached), which run the spatula node and all the previous ones.
5) At main PC: Make sure you have the updated version of arc.pmd/rgrasp.pmd that has raspberry2 options (here attached)
1) At raspberry: Make sure spatula_pos.py & spatula_publisher.py files are in the raspberries under the folder:
suction_ws/src/suction/scripts
2) At raspberry: Terminal: nano /etc/hosts
add:
(raspberry pi 2 self IP) (raspberry2 name)
(main PC IP) (main PC name)
ex:
192.0.1.1 raspberry2
192.168.37.2 mcube-020
(you can get the IP from the main PC typing: sudo ifconfig at the main PC terminal and looking at eth0)
3) At raspberry: Terminal: nano suction_env.sh
Make sure it looks like this:
#!/bin/bash
echo "suction environment executed"
. ~/suction_ws/devel/setup.bash
export ROS_IP=192.168.37.5
export ROS_MASTER_URI=http://mcube-020:11311/
export ROS_HOSTNAME=raspberry2
export ROSLAUNCH_SSH_UNKNOWN=1
PROMPT_COMMAND='history -a'
history -a
# sorting in old style
LC_COLLATE="C"
export LC_COLLATE
ulimit -c unlimited
export HISTTIMEFORMAT="%d/%m/%y %T "
NOTE: TODOS:
- Do we want gs_deflection and gs_contact_area? If not we should comment the code
- We'll need to edit raspberry2 scripts so that all the nodes that it publishes are the same as the first raspberry but adding a "2". Idea: Raspberry publishes in topics: gs_image, spatula_pos Raspberry2 publishes in topics: gs_image2, spatula_pos2
If you're looking at ROS tutorials: Equivalence with ROS multimachine tutorial marvin = [email protected] hal = [email protected]