Giter Club home page Giter Club logo

learm_ros2's Introduction

learm_ros2

A collection of ROS 2 packages for controlling the Hiwonder LeArm.

Requirements

$ sudo apt-get install libusb-1.0-0-dev libudev-dev
$ pip install --upgrade setuptools
$ pip install hidapi
$ pip install xarm # see notes below

I ran into issues with the xarm package published on pip (specifically, my arm has servo values from 500-2500 instead of the 0-1000 that the package expects). If these issues apply to you as well, install my forked version:

$ pip uninstall xarm
$ pip install git+https://github.com/andrewda/xarmservocontroller.git#subdirectory=Python

Additionally, if you encounter errors while trying to connect to the arm, try adding the following udev rule to /etc/udev/rules.d/99-xarm.rules or similar:

SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="5750", MODE="0660", GROUP="plugdev"

Then reload the rules with:

$ sudo udevadm control --reload-rules && udevadm trigger

This rule will allow users in the plugdev group to access the arm controller.

Packages

Name Description
learm_ros2 A simple follower that commands arm servo positions from joint states published on the joint_states topic.
learm_ros2_description LeArm description files, including arm meshes and URDF files.
learm_ros2_moveit_config MoveIt config files (WIP).

Running

Make sure that the LeArm is plugged into a power source, turned on, and connected over USB. Then start the follower:

$ ros2 launch learm_ros2 follower.launch.py

Next, if you want to manually control the arm for testing, start RViz and the joint publisher:

$ ros2 launch learm_ros2 run.launch.py

RViz Screenshot

learm_ros2's People

Contributors

andrewda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

learm_ros2's Issues

Missing Launch directory in learm_ros2_description

Hi! I am trying to build the workspace with colcon build --symlink-install , and I am getting the following error:

Finished <<< learm_ros2 [2.28s]
Starting >>> learm_ros2_description
--- stderr: learm_ros2_description                           
CMake Error at ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:100 (message):
  ament_cmake_symlink_install_directory() can't find
  '/home/mk/ros2_ws/src/learm_ros2/packages/learm_ros2_description/launch'
Call Stack (most recent call first):
  ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:314 (ament_cmake_symlink_install_directory)
  cmake_install.cmake:41 (include)


---
Failed   <<< learm_ros2_description [2.98s, exited with code 1]

Summary: 1 package finished [8.39s]
  1 package failed: learm_ros2_description
  2 packages had stderr output: learm_ros2 learm_ros2_description
  1 package not processed

The CMakeLists tries to access the folder but it does not exist:
This is also the output of the cmakelist:

 cat src/learm_ros2/packages/learm_ros2_description/CMakeLists.txt 
cmake_minimum_required(VERSION 3.5)
project(learm_ros2_description)

find_package(ament_cmake REQUIRED)

install(
  DIRECTORY config launch meshes rviz srdf urdf
  DESTINATION share/${PROJECT_NAME}
)

ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})

ament_package()

I would appreciate any other steps followed, for now:

cd ~/ros2_ws
rosdep update
rosdep install --from-paths src --ignore-src -r -y
 colcon build --symlink-install

EDIT: Deleting the Launch file makes everything work (LookupError: Could not find the resource 'joint_state_publisher_gui' of type 'packages' fixed with: sudo apt install ros-foxy-joint-state-publisher-gui

And it worked!! The robotic arm can be moved with RVIZ, but the visualisation does not show the robot at all, even with the coords shown in your picture!
rviz_empty

But works after sudo cp -R learm_ros2_description/meshes /home/mk/ros2_ws/install/learm_ros2/share/learm_ros2/
because meshes is not found. So my guess is that everything is related to the launch directory issue!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.