User:TinyDotSixth/sandbox

About the ARGO 6x6 ATV
The ARGO 6x6 is an ATV at the University of Waterloo.

The ARGO workspace
(NEEDS TO BE CHANGED. NOW INSIDE CATKIN_WS) A new workspace dedicated to automating ARGO was created.

mkdir -p ~/argo_ws/src cd ~/argo_ws/src catkin_init_workspace

cd ~/catkin_ws/ catkin_make

source devel/setup.bash

echo $ROS_PACKAGE_PATH /home/youruser/argo66_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks This however removes the default catkin_ws from the ROS_PACKAGE_PATH and replaces it with argo66_ws. This means the packages in catkin_ws will not be available for call in ROS. This might be a problem later on. Will change later

GPS Node
Lets start by adding the simplest node. A pre-available package for the GPS shall be used. We have a GARMIN GPS <> for the ARGO. The gsdp_client node should work for that.

I have already checked this. However, I will need to plug it in and check. Tomorrow.

IMU Node
This post describes setting up the IMU_node for ARGO.

We have a Microstrain IMU 3dmgx2. There is a standard ROS node for it. Pulling it and configuring it for ROS.

http://wiki.ros.org/microstrain_3dmgx2_imu

https://github.com/ros-drivers/microstrain_3dmgx2_imu.git

Simple Clone to argo66_ws/src and catkin_make

Notes:

1. USB0 has to be specified. This has to be glued to the device.

2. Have to connect it and see the topics that are published.

Roboteq Node
This post describes hooking up a rather outdated Roboteq Motor controller to the ARGO. The support unfortunately for the Controller is no longer there. Funnily enough, the Linux API at the Roboteq Website is gibberish. So, I found the working API form public github accounts. One link is:

https://github.com/g/roboteq

I am not entirely sure of this link. I have to download and compile it.

Compilation strangely showed that "serial" package was not installed. I installed it by:

Compiled Successfully.

Now the hardest part!. Modifiying it for the following properties:

1. Enter 10 times to get in to RS-232 mode.

2. Remove the rest gibberish. Only publish motor commands.

3. Change the topics,launch file to reflect only the brake commands.

Just checked the controller.c and driver.c. This will need a full day experimentation with the physical controller. I will connect using only C files. then later on modify changes in ROS.

Update_July 28th Roboteq Ax 3500 configured with ROS. It was the Roboteq code as explained above. Some notes: 1. The code works but is still buggy. 2. The Controller::write function often doesnt work properly. I am suspecting this might be due the mutex used in the code. 3. The current working code utilizes serial_->write; and flushes the Tx Buffer. 4. Upon restarting, it doesnt work sometimes. 5. Applied a safety function to the code. The brakes are always locked. Two additional buttons on the joystick are pushed to release the brakes. But this creates problem when the code gets stuck and the brakes are permanently locked. This has to be fixed. 6. udev rules added. Will come in handy when using a USB multiplexer.

Code Link https://github.com/LordBismaya/roboteq

Joystick Node
This post describes configuring a joystick as an input device for the ARGO. This is a standard joy_node. Should be easy.

http://wiki.ros.org/joy/Tutorials/ConfiguringALinuxJoystick

Cloned this node:

https://github.com/ros-teleop/teleop_tools

Complied Fine.

Update July 28th The Joy node gets called in as a part of argo_base_control. It is included in its launch files and scaled appropriately before being published to the roboteq_driver/argo_base_control/cmd_vel. Only Twist::linear.x and Twist::angular.z are used. The two additional safety buttons being used are published in Twist::angular.x and Twist::angular.y respectively.

The rosserial_python node subscribes to the topic of argo_base_control/cmd_vel. As a reminder, the rosserial_python node is used to command the servo.