Skip to content

Latest commit

 

History

History
272 lines (205 loc) · 8.63 KB

README.md

File metadata and controls

272 lines (205 loc) · 8.63 KB

LSS ROS2 Arms Package

The LSS-ROS2-Arms repository contains common packages that are used by both the physical and simulated LSS Arms (4DoF and 5DoF versions).

Table of Contents

Prerequisites

  1. Ubuntu 20.04.6 (Focal Fossa)
  2. ROS2 Galactic (Desktop)
  3. ROS2 dev tools:
sudo pip install colcon-common-extensions
sudo pip install vcstool
sudo apt install ros-galactic-backward-ros
sudo apt install python3-rosdep2
rosdep update --include-eol-distros
  1. Ignition Edifice

Package installation

git clone https://github.com/Lynxmotion/LSS-ROS2-Arms.git
mkdir -p src
mv LSS-ROS2-Arms/* src
mv src LSS-ROS2-Arms

Install dependencies

cd LSS-ROS2-Arms
rosdep install --from-path src -yi --rosdistro galactic
cd src
vcs import < required.repos
cd ..

Build instructions

source /opt/ros/galactic/setup.bash
export IGNITION_VERSION=edifice
colcon build --symlink-install

Initialization instructions

You will have to use this in every new session in which you wish to use these packages:

source install/setup.bash

Description package

The lss_arm_description package contains the URDF description & SDF model of the robot and the mesh files for each component.

It contains scripts that convert xacro into the required URDF and SDF files.

To generate the required SDF file used for the simulation run:

bash src/lss_arm_description/scripts/xacro2sdf.bash

The script defaults to the 4DoF version. To generate the SDF of the 5DoF model run:

bash src/lss_arm_description/scripts/xacro2sdf.bash -d 5

Similarly, if you want to generate the URDF files (not required) you can run:

bash src/lss_arm_description/scripts/xacro2urdf.bash

or

bash src/lss_arm_description/scripts/xacro2urdf.bash -d 5

All the available launch files have the following configuration options:

dof: Which LSS Arm version to use

  • options: 4, 5
  • default: 4

View Model in Rviz

ros2 launch lss_arm_description view.launch.py dof:=4


4DoF

5DoF

View in Ignition Gazebo

ros2 launch lss_arm_description view_ign.launch.py dof:=5

MoveIt2 package

The lss_arm_moveit package contains all the configuration and launch files for using the LSS Arm with the MoveIt2 Motion Planning Framework.

It offers different controller plugins for the manipulator ('fake', 'ign' and 'real')

If you want to generate the SRDF files (not required) you can run:

bash src/lss_arm_moveit/scripts/xacro2srdf.bash

or

bash src/lss_arm_description/scripts/xacro2urdf.bash -d 5

The following launch files are available:

Fake controller (Rviz)

MoveIt allows the use of a fake trajectory controller to be used for visualization purposes. The fake controllers are not designed to interact with a physics engine, so the robot’s motion is not affected by gravity or other physical forces.

ros2 launch lss_arm_moveit fake_arm_control.launch.py dof:=4


4DoF

5DoF

Simulated controller (Rviz Interface + Ignition Gazebo Simulation)

Unlike the "fake controller" the "simulated controller" integrates the robot controllers with Gazebo, allowing a realistic simulation of the robot's motion. This is useful for testing and validating the robot’s behavior in a simulated environment before deploying it in the real world.

ros2 launch lss_arm_moveit ign_arm_control.launch.py dof:=4

ros2 launch lss_arm_moveit ign_arm_control.launch.py dof:=5


Obstacle avoidance example

Real controller (RViz Interface + Physical Robot)

Before controlling the real robot first follow these steps:

  1. Update the firmware on the servos using LSS Config

  2. Follow the initial setup and make sure the IDs are configured correctly

  3. Calibrate the arm using FlowArm

  4. Set the Baud rate to 921600 and the Gyre Direction to CCW (-1) for all the servos

To control the arm:

  1. Run the launch file
ros2 launch lss_arm_moveit real_arm_control.launch.py dof:=4

  • Note: If the servos light up Blue they have been configured correctly if not try running:
sudo chmod 766 /dev/ttyUSB0
  1. To activate the servos open another terminal and run:
ros2 topic pub --once /effort_controller/commands std_msgs/msg/Float64MultiArray "data:
- 6.8
- 6.8
- 6.8
- 6.8
- 6.8"
  • Note: For the 5DoF version add an extra - 6.8
  1. Now you are able to plan the trajectories using MoveIt2 and execute them with real hardware

To make the servos go Limp use:

ros2 topic pub --once /effort_controller/commands std_msgs/msg/Float64MultiArray "data:
- 0
- 0
- 0
- 0
- 0"
  • Note: For the 5DoF version add an extra - 0

LSS Ignition MoveIt Example

The lss_ign_moveit_example package launches a simulation of the 4DoF LSS Arm in Gazebo Ignition where you can interact with a box in the virtual environment. This example includes a C++ implementation that makes the arm track the target (box) whenever you change its location.

Follow Goal Demo (Simulation)

ros2 launch lss_ign_moveit_example ex_cpp_follow_target.launch.py

  • Note: The arm only has 4 DoF so it is not always possible to reach the desired position + orientation goal. This implementation adjusts the goal orientation so it is always parallel to the base of the robot, this allows it to plan a trajectory "ignoring" the orientation.

Author

Resources

Read more about the LSS Robotic Arm in the Wiki.

Purchase the LSS arm on RobotShop.

Official Lynxmotion Smart Servo (LSS) Hardware Interface available here.

If you want more details about the LSS protocol, go here.

Have any questions? Ask them on the RobotShop Community.