This repository maintains demos targeted for the Niryo Ned2 Robot Arm with TI TDA4VM platforms. This document walks through how to run the applications provided in this repository.
This repository contains the following:
- The
nodes
sub-directory contains the Python modules that implements a robot arm following demo. - The
docker
sub-directory contains docker file to build docker container - The
patches
sub-directory contains GIT patches for edge_ai_apps and Niryo ned_ros repositories needed to run the robot arm following demo. - The
scripts
sub-directory includes scripts needed to set up demos, e.g. applying the GIT patches to the corresponding repos.
The following hardware components are necessary for robot arm demos:
- A Niryo Ned2 robot arm. It would be possible to use Niryo Simulator instead. But this document does not explain how to run the demo using the Niryo simulator.
- A working TDA4VM SK board, E2 revision or higher and the SD card flashed with the latest stable EdgeAI SDK with Robotics SDK.
- IWR6843 radar sensor connected to the SK board through USB.
- A USB camera connected to the SK board.
- Niryo and SK board should be connected to the same network through either Ethernet router or switch.
- A monitor to display camera input and detection output overlaid on top of it.
Download the prebuilt SD card image and flash it to a SD card by following the Edge AI Documentation.
Follow the instructions in the Robotics SDK User Guide Documentation on Setting up Robotics SDK and Docker Setup for ROS1 to install Robotics SDK and work with ROS1 on J7 SK board.
- Once logged on to the SK board, clone the niryo-tda4vm repository under the j7_ros_home directory.
root@tda4vm-sk:/opt/edge_ai_apps# cd ..
root@tda4vm-sk:/opt# mkdir robot && cd robot
root@tda4vm-sk:/opt/robot# git clone --single-branch --branch master https://github.com/TexasInstruments/tda4x-robotarm-demos.git
- Run
init_setup.sh
.
root@tda4vm-sk:/opt/robot# cd tda4x-robotarm-demos
root@tda4vm-sk:/opt/robot# source scripts/init_setup.sh
This script performs
- Apply a patch (edge_ai_apps_for_robot_arm.patch) to /opt/edge_ai_apps.
- Clone the Niryo ned_ros GIt repo and apply a patch (ned_ros_tda4.patch).
- Set up the soft links under
/opt/robot/tda4x-robotarm-demos/nodes/arm_follow_demo/robot_arm_follow_demo
to the package and messages in the ned_ros GIT repo. They are needed by the [Robot Arm Following]>(nodes/arm_follow_demo/robot_arm_follow_demo/README.md) demo. - Install the mmWave radar driver ROS node.
- Build Melodic docker container to run Moveit package on the SK board.
If the above commands are successful, the directory structure should look as follows:
/opt/robot/tda4x-robotarm-demos#
+ README.md
+ docker/
+ nodes/
+ arm_follow_demo/
+ niryo_robot_arm_commander/
+ niryo_robot_msgs/
+ robot_arm_follow_demo/
+ ned_ros/
+ radar_driver
+ ti_mmwave_rospkg/
+ serial/
+ patches/
+ scripts/
And you can check if docker images are built successfully. An example output based on 8.4 release is shown below.
root@tda4vm-sk:~/j7ros_home# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.gitlab.com/niryo/niryo-one-s/ned_ros_stack/v4.1.0 arm64 eed165f6d06b 2 minutes ago 2.84GB
ros melodic-perception eec268b440d3 19 minutes ago 2.23GB
j7-ros-noetic 8.4 f6c9f4f93ba8 48 minutes ago 3.4GB
artifactory.itg.ti.com/docker-public-arm/ubuntu 18.04 5777305f3710 16 months ago 56.6MB
artifactory.itg.ti.com/docker-public-arm/ubuntu 20.04 08f5c0d9d654 17 months ago 65.5MB```
- Finally, we should update
~/j7ros_home/docker_run_ros1.sh
for volume mapping of the newly created/opt/robot
directory in the Noetic Docker container. So add-v /opt/robot:/opt/robot
as a parameter todocker run
as follows:
docker run -it --rm \
-v /opt/robot:/opt/robot \
-v /home/root/j7ros_home:/root/j7ros_home \
-v /opt/robotics_sdk:/opt/robotics_sdk \
-v /home/root/j7ros_home/.ros:/root/.ros \
Niryo robot arm has Raspberry Pi 4 with Ubuntu 18.04, which is ROS Melodic is running on. Therefore, there is any additional set up needed except for disabling Moveit since Moveit is running on the SK board. Once logged on to the Niryo robot arm, we only need to comment out move_group.launch from ~/catkin_ws/src/niryo_robot_arm_commander/launch/robot_commander.launch, e.g.
....
<include file="$(find niryo_robot_arm_commander)/launch/robot_commander_base.launch.xml">
<arg name="hardware_version" value="$(arg hardware_version)" />
</include>
<!-- Moveit move_group -->
<!--
<group unless="$(arg gazebo)">
<include file="$(find niryo_moveit_config_standalone)/launch/move_group.launch">
<arg name="hardware_version" value="$(arg hardware_version)" />
<arg name="simulation_mode" value="$(arg simulation_mode)" />
</include>
</group>
<group if="$(arg gazebo)">
<include file="$(find niryo_moveit_config_w_gripper1)/launch/move_group.launch">
<arg name="load_robot_description" value="false"/>
<arg name="hardware_version" value="$(arg hardware_version)" />
<arg name="simulation_mode" value="$(arg simulation_mode)" />
</include>
</group>
-->
...
Please follow the instructions in the Robotics SDK User Guide Documentation on Set Up Docker Environment on the Remote PC for Visualization.
This is optional though since a current robot arm demo does not require visualization on Ubunt PC.
Please follow the link below for details on running the robot arm demo.