Difference between revisions of "Software Setup Guide"

From Pengatom Robotics Wiki
Jump to: navigation, search
(ROS)
(ROS)
 
(9 intermediate revisions by the same user not shown)
Line 14: Line 14:
  
 
[http://wiki.ros.org/melodic/Installation/Ubuntu  Install ROS]
 
[http://wiki.ros.org/melodic/Installation/Ubuntu  Install ROS]
 +
Or use this from [https://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_workbench/ Robotis]
  
 
Make sure to install dependencies with
 
Make sure to install dependencies with
Line 33: Line 34:
  
 
Setup  [http://gazebosim.org/tutorials?cat=connect_ros Gazebo] with ROS
 
Setup  [http://gazebosim.org/tutorials?cat=connect_ros Gazebo] with ROS
 
= Move stuff up above this line if its needed =
 
----
 
 
 
== Core library & Project dependencies: ==
 
 
$ sudo apt-get install build-essential git libjpeg-dev gcc-multilib g++-multilib
 
  
 
== Joystick ==  
 
== Joystick ==  
=== Bluetooth & ps3_demo dependencies: ===
 
 
$ sudo apt-get install bluez-utils bluez-compat bluez-hcidump libusb-dev libbluetooth-dev joystick
 
 
[https://help.ubuntu.com/community/Sixaxis#Quick_Setup_Guide_for_12.10 Setup PS3 Joystick]
 
 
 
=== JStest gtk and joystick ===
 
=== JStest gtk and joystick ===
  
Line 64: Line 51:
 
  sudo jscal-store /dev/input/jsX
 
  sudo jscal-store /dev/input/jsX
 
Where 'X' is the joystick input
 
Where 'X' is the joystick input
 +
 +
=== Bluetooth & PS4 dependencies: ===
 +
 +
 +
PS4 controllers can connect directly via Bluetooth in Ubuntu, but in order to get all axis, buttons and sensors to work properly, I recommend installing "ds4drv".
 +
 +
 +
To install ds4drv, we use [https://linuxize.com/post/how-to-install-pip-on-ubuntu-18.04/ pip3]:
 +
sudo pip3 install ds4drv
 +
 +
Allow non-root users to control the ds4drv joystick: Location:/etc/udev/rules.d/
 +
 +
sudo wget https://raw.githubusercontent.com/chrippa/ds4drv/master/udev/50-ds4drv.rules -O /etc/udev/rules.d/50-ds4drv.rules
 +
 +
sudo udevadm control --reload-rules
 +
 +
sudo udevadm trigger
 +
 +
Then run it with sudo:
 +
 +
sudo ds4drv
 +
 +
Now hold ps button and share button on the controller and you should see the following in your terminal:
 +
 +
http://ros-developer.com/wp-content/uploads/2017/12/PS4_Controller_Pair_Mode.jpg
 +
 +
[info][controller 1] Created devices /dev/input/js0 (joystick) /dev/input/event16 (evdev)
 +
[info][bluetooth] Scanning for devices
 +
[info][bluetooth] Found device 40:1B:5F:F0:18:6B
 +
[info][controller 1] Connected to Bluetooth Controller (40:1B:5F:F0:18:6B)
 +
[info][bluetooth] Scanning for devices
 +
[info][controller 1] Battery: 75%
 +
 +
Now, pull up jstest-gtk and verify axis are as follow:
 +
 +
https://www.trossenrobotics.com/Shared/XSeries/ps4.jpg
  
 
== Simple PS4 Servo Move ==
 
== Simple PS4 Servo Move ==
Line 75: Line 98:
 
  cd example/protocol1.0/read_write/linux64/
 
  cd example/protocol1.0/read_write/linux64/
 
  ./read_write
 
  ./read_write
 +
 +
= Move stuff up above this line if its needed =
 +
----
 +
 +
 +
== Core library & Project dependencies: ==
 +
 +
$ sudo apt-get install build-essential git libjpeg-dev gcc-multilib g++-multilib
 +
  
 
=== Install HR-OS5 ROS package from [https://github.com/Interbotix/ros_hros5/blob/master/README.md Interbotix.]: ===
 
=== Install HR-OS5 ROS package from [https://github.com/Interbotix/ros_hros5/blob/master/README.md Interbotix.]: ===

Latest revision as of 11:03, 30 June 2020

Misc

$ sudo apt-get update

User Access

Grant local user real-time access to the Arbotix Pro:

echo "ulimit -r 31" >> ~/.bashrc
sudo su
echo "<username> soft rtprio 31" >> /etc/security/limits.conf
echo "<username> hard rtprio 31" >> /etc/security/limits.conf
sudo usermod -a -G dialout <username>


ROS

Install ROS Or use this from Robotis

Make sure to install dependencies with

sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential

and initialize them. All this is described in 1.6

I recommend going through a couple of Tutorials, at least to verify installation and configure your environment

Tips:

Use following command to set ROS hostname when using single machine setup:

export ROS_HOSTNAME=localhost

Install ROS on Arbotix-M

There is a great tutorial for this here!

Gazebo

Setup Gazebo with ROS

Joystick

JStest gtk and joystick

These are two tools included in the Ubuntu repositories. The first of the two, jstest-gtk, is a graphical tool, and joystick is a set of commandline utilities.
You can install them using:

sudo apt-get install jstest-gtk 

or

sudo apt-get install joystick

Jstest-gtk is a front end to joystick's commandline tools.
Changes in mapping or calibration can be done with command:

sudo jscal-store /dev/input/jsX

Where 'X' is the joystick input

Bluetooth & PS4 dependencies:

PS4 controllers can connect directly via Bluetooth in Ubuntu, but in order to get all axis, buttons and sensors to work properly, I recommend installing "ds4drv".


To install ds4drv, we use pip3:

sudo pip3 install ds4drv

Allow non-root users to control the ds4drv joystick: Location:/etc/udev/rules.d/

sudo wget https://raw.githubusercontent.com/chrippa/ds4drv/master/udev/50-ds4drv.rules -O /etc/udev/rules.d/50-ds4drv.rules
sudo udevadm control --reload-rules
sudo udevadm trigger

Then run it with sudo:

sudo ds4drv

Now hold ps button and share button on the controller and you should see the following in your terminal:

PS4_Controller_Pair_Mode.jpg

[info][controller 1] Created devices /dev/input/js0 (joystick) /dev/input/event16 (evdev) 
[info][bluetooth] Scanning for devices
[info][bluetooth] Found device 40:1B:5F:F0:18:6B
[info][controller 1] Connected to Bluetooth Controller (40:1B:5F:F0:18:6B)
[info][bluetooth] Scanning for devices
[info][controller 1] Battery: 75%

Now, pull up jstest-gtk and verify axis are as follow:

ps4.jpg

Simple PS4 Servo Move

git clone https://github.com/Pengatom/SimlePS4ServoMove.git
cd SimlePS4ServoMove/c++/build/linux64/
make
sudo make install 
cd ..
cd ..
cd example/protocol1.0/read_write/linux64/
./read_write

Move stuff up above this line if its needed



Core library & Project dependencies:

$ sudo apt-get install build-essential git libjpeg-dev gcc-multilib g++-multilib


Install HR-OS5 ROS package from Interbotix.:

Dependencies:

git clone https://github.com/Interbotix/HROS5-Framework ./src/hros5_misc/hros5_framework
cd src/hros5_misc/hros5_framework/Linux/build/
make

ROS packages:

sudo apt-get install ros-indigo-joy
sudo apt-get install python-rosinstall
sudo apt-get install ros-indigo-robot-localization
sudo apt-get install ros-indigo-rtabmap-ros
sudo apt-get install ros-indigo-rtabmap
sudo apt-get install ros-indigo-joint-trajectory-controller
sudo apt-get install ros-indigo-effort-controllers ros-indigo-joint-state-controller ros-indigo-joint-state-publisher ros-indigo-controller-manager ros-indigo-imu-sensor-controller ros-indigo-position-controllers 


$ sudo apt-get install

$ sudo apt-get install

$