Skip to content
Branden Romero edited this page Dec 9, 2015 · 32 revisions

This wiki page documents the main components of the robotic platform we are developing. IP UCBwireless jaguar ip 10.201.31.87

Connecting to the Jaguar

Requirements: Ubuntu 14.04 LTS with ROS Indigo

  1. Connect to jaguar_ap wi-fi (the password is changeme)
  2. On your local computer add these two lines of code to ~/.bashrc:
export ROS_MASTER_URI=http://10.201.31.87:11311
export ROS_IP=$(ifconfig wlan0|grep -Po 't addr:\K[\d.]+')

This creates two environment variables, ROS_MASTER_URI and ROS_IP. ROS_MASTER_URI is the URI of the master computer, more specifically the computer that will contain the roscore. We set the master to be the Jetson on the Jaguar.

In order to publish topics that are accessible to all the computers in the network, you must designate the origin of those topics. This is accomplished by setting the ROS_IP environment variable. Because we are connected via wi-fi to the Jaguar, you must use the IP address given to you by the Jaguar. So, we use the IP address associated with wlan0. If you have multiple wi-fi connections on your computer you may have to use another wlan IP.

It is important to note that if you are using ROS on another project or robot, do not put this in your bashrc, but rather execute those two lines of code for every terminal you open.

The IP address for the Jaguar, when connected to jaguar_ap, is 192.168.205.1. So to remotely access the Jaguar enter this into your terminal:

ssh ubuntu@192.168.205.1

It will then ask you for a password, and the password is ubuntu. If you dislike memorizing IP addresses you can ssh into the Jaguar by name. To do with, modify /etc/hosts, so that it contains this line:

192.168.205.1   jaguar

Now you can ssh into the jaguar by executing this line in the terminal:

ssh ubuntu@jaguar

##The Jaguar is not connected to the internet (for now)
If you want to add a file or directory to the Jaguar you have to do it via file transfer from a different computer. Do not disconnect the Ethernet cable attached to the Jaguar and plug in the Ethernet cable from skynet, you will not get internet (the Ethernet port has been configured for the laser scanner, hence it will not get internet.) So connect to jaguar_ap, and execute this line of code from your computer:

scp {file you want to transfer} ubuntu@192.168.205.1:~/{location where you want to put it on the Jaguar}

##Making files
Because the Jaguar cannot connect to the internet and is not constantly connected to a power source, making the files is particularly annoying and it requires you to travel to the future. Anyway if you modify a file and try to make it, it probably won't make because of a clock skew (it thinks files are written in the future, so it doesn't think it has been modified). So to actually make something the future must become the past (that’s deep). So change the date on the computer. I recommend changing it to your birthday 10 years from now to get you thinking about the future while you wait for your code to compile. So execute:

sudo date {month of your birthday}{year of your birthday}{hour you were born}{minute you were born}2025

This will probably give you an excuse to call your parents/guardian to ask what time you were born too. If you modify code for the jaguar node, laser scanner, or robot localization please contact me to get my birthday, so you set the clock beyond it (sorry for making things more complicated).

Overall Launch File:

Location: /home/ubuntu/catkin_ws/src/single_launch
Name of the Launch File: all_launch.launch
Method to Launch: roslaunch all_launch.launch

Sensors

##Laser Pepperl Fuchs 2D-Laserscanner R2000 wiki ROS

CONNECTION

To connect the scanner to the Tegra:

  • Setup a shared ethernet connection on the Tegra
  • Change the Ethernet setting on the scanner to DHCP and reboot.
  • An IP address was assigned to the scanner which is used to communicate with it.

Laser Scanner IP Address on the Tegra: 10.42.0.72

ROS DRIVER

ROS driver: https://github.com/dillenberger/pepperl_fuchs

The ROS node is called: r2000_node

This publishes messages of type: sensor_msgs/LaserScan

A launch file is used in order to include certain parameters (like the scanner's IP address).

To launch only the ROS node, use the command:

roslaunch pepperl_fusch_r2000 r2000_node.launch

To visualize using RViz, use the command:

roslaunch pepperl_fusch_r2000 gui_example.launch

To access the LaserScan messages, use the command:

rostopic echo /r2000_driver_node/scan

GPS

We are using Garmin GPS System.

UDEV Rule : 
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403" , ATTRS{manufacturer}=="FTDI"  ,ATTRS{serial}=="AL00ITFV" ,  MODE="0666" , SYMLINK+="GPS_System"

Launch File:
<node pkg="nmea_navsat_driver" type="nmea_serial_driver" name="navsattest" respawn="true">
   <param name="port" value="/dev/GPS_System"/>
   <param name="baud" value="115200"/>
   <remap from="fix" to="/gps/fix"/>
   <remap from="vel" to="/gps/twist"/>
</node>

Odometer

IMU

We are using 9 Degrees of Freedom - Razor IMU

UDEV Rule:
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403" , ATTRS{manufacturer}=="FTDI"  ,ATTRS{serial}=="A703EBFG" ,  MODE="0666" , SYMLINK+="IMU_System"

Launch File:
<node pkg="razor_imu_9dof" type="imu_node.py" name="imu" output="screen">
    <rosparam file="$(find razor_imu_9dof)/config/my_razor.yaml" command="load"/>
    <remap from="imu" to="/imu/data" /> 
</node>

Jaguar Node / Motor Controller

UDEV Rule: 
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403" , ATTRS{manufacturer}=="FTDI"  ,ATTRS{serial}=="AH02LWD6" ,  MODE="0666" , SYMLINK+="MOTOR_System" , RUN+="/bin/stty -F /dev/MOTOR_System 115200"

Launch File:
<node pkg="jaguar" type="jaguar_node" name="jaguar_node_info">
	<param name="RobotCommMethod" value="Serial"/>
	<param name="RobotID" value="arpg_jag"/>
	<param name="RobotBaseIP" value="192.168.0.60"/>
	<param name="RobotPortNum" value="10001"/>
	<param name="RobotSerialPort" value="/dev/MOTOR_System"/>
	<param name="RobotType" value="Jaguar"/>
	<param name="MotorDir" value="1"/>
	<param name="WheelRadius" value="0.135"/>
	<param name="WheelDistance" value="0.45"/>
	<param name="EncoderCircleCnt" value="190"/>
	<param name="MinSpeed" value="0.1"/>
	<param name="MaxSpeed" value="1.0"/>
	<param name="Enable_IR" value="false"/>
	<param name="Enable_US" value="false"/>
</node>

Occam Robotics

Setting up the Occam camera

Create UDEV Rules for Occam- Create a file: /etc/udev/rules.d/occam.rules And add this line to it:

SUBSYSTEM==”usb”, ATTRS{idVendor}==”285e”, ATTRS{idProduct}==”3efd”, MODE=”0666″

Then restart udev:

sudo service udev restart

Then unplug and re-plug the camera, and it should appear with permissions 666, allowing any user on the system to talk to the camera with libusb.

The Occam camera driver is located in ~/occamdrivers/indigosdk-2.0.34 This also includes examples on how to use it. One of the examples shows how to read images into an OpenCV image object and display it: /build/bin/read_images_opencv.

Using Occam images in ROS

The node to publish the images in ROS can now be found here: ~/image_transport_ws/src/occam_publisher

To launch the node, run: rosrun occam_publisher occam_publisher

This publishes to the topic: /occam/image

The occam_publisher node can publish either individual camera images, a tiled image or a stitched image (360 view). This can be passed as a command line argument to the node. The options are: image0, image1, image2, image3, image4, image_tiles0, stitched_image0. For example, if you need only the front camera, you would use:

rosrun occam_publisher occam_publisher "image0"

When no "image type" option is provided on the command-line, the default is stitched_image0.

Actuators

Differential tank drive

Instructions on how drive Jaguar with Logitech Wireless Gamepad F710.

In a terminal enter the following commands:

$ stty -F /dev/ttyUSB2 115200

$ cd ~/catkin_ws

$ roscore

In a new terminal enter the following commands:

$ sudo chmod a+rw /dev/input/js0

$ rosparam set joy_node/dev "/dev/input/js0"

$ rosrun joy joy_node

In a new terminal enter the following commands:

$ cd ~/catkin_ws/devel/lib/jaguar

$ rosparam load ~/catkin_ws/src/jaguar/jaguar.yaml

$ ./jaguar_node

In a new terminal enter the following commands:

$ cd ~/catkin_ws/devel/lib/jaguar

$ ./jaguar_joystick

Now you can control the Jaguar with the following controls via Logitech Wireless Gamepad F710:

RIGHT-THUMBSTICK Forward - Drive Forwards

RIGHT-THUMBSTICK back - Drive Backwards

RIGHT-THUMBSTICK left - Turn Left

RIGHT-THUMBSTICK right - Turn Right

DIRECTIONAL-PAD up - Rotate Front Flippers Counter-Clockwise

DIRECTIONAL-PAD down - Rotate Front Flipper Clockwise

DIRECTIONAL-PAD right - Rotate Back Flippers Counter-Clockwise

DIRECTIONAL-PAD left - Rotate Back Flipper Clockwise

Stewart platform

Computing

The Jaguar is equipped with a Nvidia Jetson TK1.

Communication

Power

The robot is powered by four LiPo battery packs that add up to 20Ah at 22.2V.

Recharging Instructions:

  1. From the program select menu, navigate to LiPo BATT using the blue arrow buttons, and then press the green start/enter button.

  2. Use the blue arrow buttons to change to LiPo BALANCE mode and press the green start/enter button again

  3. Change the power to 2.0A and 22.2V(6S) using the green button to choose the setting, and the blue button to alter it.

  4. Connect one of the 7 pin cables to the corresponding 6S connector on the battery charger, and then connect the power cable that is zip tied to the 7 pin cable to the power cable on the charger.

  5. Once certain that everything is properly connected, and all the settings are correct, press and hold the green start/enter button until you get to the battery check display.

  6. You will then see R: 6SER S: 6SER. Press the green button once more to confirm and begin charging.

  7. While charging, you can press the blue arrow button to confirm that each of the 6 cells are balanced. If there is any sort of significant difference between any of the cells, press the red button on the charger to cancel charging, disconnect the battery pack, and report the problem.

  8. Do not leave batteries unattended while charging!

For additional reference, please see pages 14 and 15 of the jaguar user manual. http://jaguar.drrobot.com/images/Jaguar_manual.pdf