Universal_Robots_ROS_Driver icon indicating copy to clipboard operation
Universal_Robots_ROS_Driver copied to clipboard

Drawing two robots to RVIZ

Open hamyyy opened this issue 2 years ago • 1 comments

Hi,

This is not really an issue, more of a "need help". I didn't know where to post this so I figured I'd do it here. If it should be posted elsewhere please guide me to the right path :)

I have a single UR10e robot and it's working perfectly with this ROS driver. I want to be able to plan movement ahead of time to check it with obstacles in rviz. I'm aware of moveit but I'm doing this in python at the moment and don't plan on using moveit.

I essentially want two robots to display in rviz. One mimicking the joint states of the real robot, and another that I can control independently with calls to its own controller. Essentially turning it into a simplified UR10e simulation.

i had a look at roslaunch ur_description view_ur10e.launch. This is basically exactly what i want, but i cannot have this launch file running along with roslaunch ur_robot_driver ur10e_bringup.launch at the same time, or else I get weird behavior. Here's how I'm doing that:

my custom_bringup.launch file contains:

<?xml version="1.0"?>
<launch>
  <include file="$(find ur_robot_driver)/launch/ur10e_bringup.launch" ns="robot" pass_all_args="true"/>
  <include file="$(find ur_description)/launch/view_ur10e.launch" ns="sim"/>
</launch>

and i run:

roslaunch ur10e_controller custom_bringup.launch robot_ip:=localhost

To get it started.

Without the namespaces, the ur_robot_driver crashes. With namespaces, I can get all nodes to run but rviz toggles really fast between joint states. I assume the joint states are being published to the same topic. So i need some sort of prefix. I'm relativly new to ROS and help is deeply appreciated.

Here's a short video of me launching the above script:

https://user-images.githubusercontent.com/24788807/169324071-d8fe48d4-9208-4d06-88c9-a24c7b2523b1.mp4

hamyyy avatar May 19 '22 14:05 hamyyy

Not exactly what you are looking for, but we have an example of a cell using two robots. We've created a guide explaining all the necessary steps, as you'll need to namespace everything: the frames, the joint states and the controllers. As you also already assumed, you probably have a clash there. I hope, the example helps you implementing your solution.

fmauch avatar Jun 02 '22 12:06 fmauch

This issue has not been updated for a long time. If no further updates are added, this will be closed automatically. Comment on the issue to prevent automatic closing.

github-actions[bot] avatar Jan 26 '23 22:01 github-actions[bot]

This issue has been closed due to inactivity. Feel free to comment or reopen if this is still relevant.

github-actions[bot] avatar Feb 25 '23 22:02 github-actions[bot]