Universal_Robots_ROS2_Driver icon indicating copy to clipboard operation
Universal_Robots_ROS2_Driver copied to clipboard

Moveit with ursim

Open Abelpy1 opened this issue 3 years ago • 2 comments

Hello, recently I tried to test Moveit on ursim, and my solutions are as follows:

My Environment:

  • docker
  • ROS Distro: foxy

Steps to test:

  1. Firstly, referring from Universal_Robots_ROS2_Driver/ur_robot_driver/resources/ursim_driver , I created two containers, one for ursim, another for experiments.
  2. Then i run ros2 launch ur_bringup ur_control.launch.py ur_type:=ur5e robot_ip:=172.17.0.2 use_fake_hardware:=false launch_rviz:=false to start the robot driver and controllers, connect to the ursim.
  3. After that, using Moveit2 package, I wrote code to implement pose tracking, expect to control the movement of the robot arm with the handle. But it failed. When i moved the handle, the robot didn't move at all.

What do you think may have caused the experiment to fail? I check the output of some topics, like /joint_trajectory_controller/joint_trajectory, it looks normal. I am very confused that if the ursim doesn't support URPositionHardwareInterface

Abelpy1 avatar Dec 09 '21 07:12 Abelpy1

@Abelpy1 this doesn't seem to be a problem with this repository. Am I right?

Can you control the robot with MoveIt only?

destogl avatar Dec 09 '21 14:12 destogl

I've just experiencing the same thing when using the URSim docker image.

The robot's logs show that it tries to connect to the reverse interface using the IP 127.0.0.1 due to the way I setup using the docker container.

The current parameter structure doesn't support setting the IP address that should be used for accessing the ROS machine. In the client library we have the parameter reverse_ip. But that's currently not available in the ROS2 driver, yet.

I'm still rather new to the whole docker network setup topic, but I'll start using it more frequently in the near future.

Edit: My docker command used:

docker run --rm -it -p 5900:5900 -p 6080:6080 -p 29999:29999 -p 30001:30001 -p 30004:30004 -p 30002:30002 -v /home/mauch/.ursim/urcaps:/urcaps -v /home/mauch/.ursim/programs:/ursim/programs universalrobots/ursim_e-series

fmauch avatar Dec 09 '21 14:12 fmauch

Since a script for starting URSim is now included into the package and usage is documented, I'm going to close this.

fmauch avatar May 09 '23 06:05 fmauch