The LSS-ROS2-Arms repository contains common packages that are used by both the physical and simulated LSS Arms (4DoF and 5DoF versions).
- Prerequisites
- Package installation
- Description package
- MoveIt2 package
- Follow goal example
- Author
- Resources
- Ubuntu 20.04.6 (Focal Fossa)
- ROS2 Galactic (Desktop)
- ROS2 dev tools:
sudo pip install colcon-common-extensions
sudo pip install vcstool
sudo apt install ros-galactic-backward-ros
rosdep update --include-eol-distros
cd your-ros-workspace/src
git clone https://github.com/Lynxmotion/LSS-ROS2-Arms.git
cd LSS-ROS2-Arms
rosdep install --from-path . -yi --rosdistro galactic
vcs import < required.repos
source /opt/ros/galactic/setup.bash
export IGNITION_VERSION=edifice
cd your-ros-workspace
colcon build --symlink-install
You will have to use this in every new session in which you wish to use these packages:
source install/setup.bash
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
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
Real controller (RViz Interface + Physical Robot)
Before controlling the real robot first follow these steps:
-
Update the firmware on the servos using LSS Config
-
Follow the initial setup and make sure the IDs are configured correctly
-
Calibrate the arm using FlowArm
-
Set the Baud rate to 921600 and the Gyre Direction to CCW (-1) for all the servos
To control the arm:
-
Add
LSS-ROS2-Control
to your colcon worspace:git clone https://github.com/Lynxmotion/LSS-ROS2-Control
and recompile the workspace -
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
- 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
- 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
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.
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.