xArm-Developer / xarm_ros2

ROS2 developer packages for robotic products from UFACTORY
https://www.ufactory.cc/pages/xarm
BSD 3-Clause "New" or "Revised" License
125 stars 77 forks source link

xarm_api c++ example ros2 #106

Closed Murali25111993 closed 3 weeks ago

Murali25111993 commented 1 month ago

Hello,

I am trying to write equivalent ros2 c++ code for the findobj_grasp_xarm_api.cpp.

I have attached the code here. findobj_grasp_xarm_api.txt

However , when I try to run the code, :

  1. ros2 launch xarm_api xarm6_driver.launch.py robot_ip:= 192.168.1.233

  2. ros2 run xarm_vision xarm_simple_planner

my robot is not moving.

Screenshot from 2024-10-24 11-04-52

Kindly check the code and provide solution.

Thanks

Murali25111993 commented 3 weeks ago

I have managed to solve the issue. However I cannot able to set the vacuum gripper

terminal 1: ros2 launch xarm_api xarm6_driver.launch.py robot_ip:= 192.168.1.233 [add_vacuum_gripper:=true]

I could not able to find ros2 service list and ros2 node list for vacuum gripper

I have attached screenshot

Screenshot from 2024-10-29 11-34-04 Screenshot from 2024-10-29 11-35-42

penglongxiang commented 3 weeks ago

Please follow the instruction here of "service" part. Create your xarm_api/config/xarm_user_params.yaml file (in case xarm_params.yaml is overwritten in future repo update) and enable the interested services, in your case it would be setting "set_vacuum_gripper" to be true. This mechanism is different from our ros1 repository.

Murali25111993 commented 3 weeks ago

Thanks, This sorted my problem.

This issue can be closed now.