NiryoRobotics / niryo_one_ros

Niryo One ROS stack
GNU General Public License v3.0
234 stars 160 forks source link

moveit + Collision objects guide #50

Open zakimohzani opened 3 years ago

zakimohzani commented 3 years ago

Hey guys,

Not sure where to place this guide so it's here for now. Our aim was to add collision objects into the world to prevent damage to our Niryo.

Renard has mentioned in the forums that meshes don't work in ARM. Hence, we used an extra x86 computer to run moveit.

The steps (or rather hacks) are:

  1. Ensure /etc/hosts file on both RaspPi & x86 computer have the correct names and ip addresses of both machines. E.g. 10.10.10.10 niryo-desktop 10.10.10.47 intel-machine

  2. On the RaspPi, modify 'niryo_one_ros/niryo_one_bringup/launch/niryo_one_base.launch'. Modify line 55 to force the urdf with mesh to load (niryo_one.urdf).

  3. On the RaspPi, modify 'niryo_one_ros/niryo_one_bringup/config/rpi_ros_processes.yaml'. Modify the parameters of 'robot_commander', 'user_interface', and 'vision_node' where the following is as such: launch_on_startup: false

  4. On the x86 computer, create /home/niryo. Use the root account and then chown & chgrp the niryo folder to your main account. Also create /home/niryo/niryo_one_positions /home/niryo/niryo_one_saved_values /home/niryo/niryo_one_sequences /home/niryo/niryo_one_trajectories /home/niryo/niryo_one_workspaces

  5. Boot up the robot

  6. Connect x86 computer to robot via Wifi

  7. Execute 'rosnode list' and 'rostopic list' to double-check that both machines can talk to each other.

  8. On the x86, execute roslaunch niryo_one_bringup robot_commander.launch

  9. On either machine, execute roslaunch niryo_one_bringup user_interface.launch

  10. On either machine, execute roslaunch niryo_one_bringup vision.launch

  11. If this works well, one should be able to see the robot with mesh within Rviz. If it failed, you will not see the robot, you will only see the tfs.

You should also be able to use niryo_studio GUI. However, the GUI will not show the collision objects.

mtc-20 commented 2 years ago

Hi, I'm fiddling around with the Niryo One for various projects. I also came to a similar solution regarding setting the IP address in /etc/hosts. However, I ran into a problem:

By changing/editing the /etc/hosts of niryo-desktop, the systemctl service that launches all the ROS nodes on the Pi stopped working. As in the Pi always shows red LED, no roscore running and hence I'm unable to connect to it in hotspot mode - how did you get around this?

Even otherwise, I can't seem to get move_group path planning to work; every time it raises a PATH_TOLERANCE_VIOLATED error when I use set_pose_target and go, changing the tolerance values in the controller config didn't help.