# ROS2 UR10e Robot Position Updates In Rviz But Cannot Be Conrolled

**URL:** <https://forum.universal-robots.com/t/ros2-ur10e-robot-position-updates-in-rviz-but-cannot-be-conrolled/24825>\
**Category:** ROS\
**Created:** [November 4, 2022, 2:15pm UTC](https://forum.universal-robots.com/t/ros2-ur10e-robot-position-updates-in-rviz-but-cannot-be-conrolled/24825 "2022-11-04T14:15:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon92354819](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@anon92354819](https://forum.universal-robots.com/u/anon92354819)\
**Post date:** [November 4, 2022, 2:15pm UTC](https://forum.universal-robots.com/t/ros2-ur10e-robot-position-updates-in-rviz-but-cannot-be-conrolled/24825/1 "2022-11-04T14:15:42Z")

</div>

I am currently having issues trying to control my UR10e robot via ROS2 in a WSL2 environment.

**Current Setup:**

- ROS2 Humble installed on Ubunutu 22.04 via WSL2 on a Windows 10 machine

- Universal\_Robots\_ROS2\_Driver ver 2.2.4 installed per instructions located at: [GitHub - UniversalRobots/Universal\_Robots\_ROS2\_Driver: Universal Robots ROS2 driver supporting CB3 and e-Series](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver)

- Powershell is running with following commands setup under netsh interface portproxy:

```auto
add v4tov4 listenport=50001 connectaddress=172.22.222.208 connectport=50001
```

```auto
add v4tov4 listenport=50002 connectaddress=172.22.222.208 connectport=50002
```

```auto
add v4tov4 listenport=50003 connectaddress=172.22.222.208 connectport=50003
```

Where 172.22.222.208 is my current WSL2 IP

- UR10e is connected directly to my PC with a straight cable
- NIC on the PC is manually set to 192.168.1.101
- UR10e Network Settings are set to 192.168.1.102
- No modifications or settings updated in moveit

If I run the externalcontrol software on the pendent without running any ROS2 programs, I get a timeout on the pendent.

- Normal.

When I run:

```auto
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur10e robot_ip:=192.168.1.102
```

and then run the externalcontrol program on the UR10e, no timeout occurs

- Normal.

After running the externalcontrol program, there is no feedback in my WSL2 ROS2 terminal. Is this

- Normal?

After running that command, Rviz2 will open up and it shows the robot in the position that the actual robot is in.

- Normal.

If I stop the externalcontrol software and manually move the robot arm, Rviz2 is updated with the new position in real time even though externalcontrol software is stopped.  
Normal?

If I kill the terminal such that no nodes are running while the externalcontrol program is still running, I do not get a timeout.

- Normal?

As for MoveIt, (assume this is a fresh start), I run:

ros2 launch ur\_robot\_driver ur\_control.launch.py ur\_type:=ur10e robot\_ip:=192.168.1.102 launch\_rviz:=false

Then in a second terminal, I run:

```auto
launch ur_moveit_config ur_moveit.launch.py ur_type:=ur10e robot_ip:=192.168.1.102
```

Rviz2 opens up with the moveit tools and I drag the robot to a slightly new position. I then click plan and execute which shows the planned path but then says “Failed” underneath “Plan & Execute”. The moveit terminal.

In my ur\_robot\_driver terminal, I get a message and an error:

```auto
 [ur_ros2_control_node-1] [INFO] [1667570357.285096200] [scaled_joint_trajectory_controller]: Received new action goal
```

```auto
 [ur_ros2_control_node-1] [ERROR] [1667570357.285246000] [scaled_joint_trajectory_controller]: Can't accept new action goals. Controller is not running. 
```

However a ros2 node list reports:

/controller\_manager  
/dashboard\_client  
/force\_torque\_sensor\_broadcaster  
/forward\_position\_controller  
/interactive\_marker\_display\_94736246638448  
/io\_and\_status\_controller  
/joint\_state\_broadcaster  
/move\_group  
/move\_group\_private\_94458103812400  
/moveit\_simple\_controller\_manager  
/robot\_state\_publisher  
/rviz2\_moveit  
/rviz2\_moveit  
/rviz2\_moveit\_private\_139908291465840  
/scaled\_joint\_trajectory\_controller  
/servo\_node  
/servo\_node\_private\_94036311342704  
/speed\_scaling\_state\_broadcaster  
/transform\_listener\_impl\_5586890a72c0  
/transform\_listener\_impl\_55e8bdd87f20  
/transform\_listener\_impl\_56297fe87f90  
/transform\_listener\_impl\_56297ffb91a0  
/transform\_listener\_impl\_562983530c00

From here, I’m not sure what I’m doing wrong. Let me know if there is any important information that I have neglected to include.

---

<div class="post-metadata">

**Author:** ![anon30780346](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@anon30780346](https://forum.universal-robots.com/u/anon30780346)\
**Post date:** [November 5, 2022, 4:13pm UTC](https://forum.universal-robots.com/t/ros2-ur10e-robot-position-updates-in-rviz-but-cannot-be-conrolled/24825/2 "2022-11-05T16:13:55Z")

</div>

Have you tried to launch the ur\_robot\_driver like this:

```auto
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur10e robot_ip:=192.168.1.102 launch_rviz:=false initial_joint_controller:=joint_trajectory_controller

```

I think there is a problem with the `scaled_joint_trajectory_controller` that’s why we have to add `initial_joint_controller:=joint_trajectory_controller`

---

<div class="post-metadata">

**Author:** ![anon92354819](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@anon92354819](https://forum.universal-robots.com/u/anon92354819)\
**Post date:** [November 7, 2022, 2:33pm UTC](https://forum.universal-robots.com/t/ros2-ur10e-robot-position-updates-in-rviz-but-cannot-be-conrolled/24825/3 "2022-11-07T14:33:17Z")

</div>

> [@anon30780346](#):
>
> Have you tried to launch the ur\_robot\_driver like this:

Just attempted this with no noticeable changes.

I first ran the suggested command line above and then the moveit command in my original post. After those were both completed, I executed the external control software on the robot itself. No terminal feed back in either the ur\_control.launch termnial or in the moveit terminal. The external pendent appears to be running fine with no time out errors.

I then made a simple position adjustment in moveit by dragging the robot to a new position and selected plan & execute.

This returned a “Failed” in Rviz2 and in the moveit terminal the follow was printed:

> [@](#):
>
> [move\_group-1] [INFO] [1667831126.954048100] [moveit\_move\_group\_default\_capabilities.move\_action\_capability]: Received request  
> [move\_group-1] [INFO] [1667831126.954388900] [moveit\_move\_group\_default\_capabilities.move\_action\_capability]: executing…  
> [move\_group-1] [INFO] [1667831126.961974000] [moveit\_move\_group\_default\_capabilities.move\_action\_capability]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.  
> [move\_group-1] [INFO] [1667831126.962143900] [moveit\_ros.plan\_execution]: Planning attempt 1 of at most 1  
> [move\_group-1] [INFO] [1667831126.962254700] [moveit\_move\_group\_capabilities\_base.move\_group\_capability]: Using planning pipeline ‘move\_group’  
> [move\_group-1] [INFO] [1667831126.964050100] [moveit.ompl\_planning.model\_based\_planning\_context]: Planner configuration ‘ur\_manipulator’ will use planner ‘geometric::RRTConnect’. Additional configuration parameters will be set when the planner is constructed.  
> [rviz2-2] [INFO] [1667831127.157307500] [move\_group\_interface]: Plan and Execute request accepted  
> [move\_group-1] [WARN] [1667831127.418574400] [moveit\_trajectory\_processing.time\_optimal\_trajectory\_generation]: Joint acceleration limits are not defined. Using the default 1 rad/s^2. You can define acceleration limits in the URDF or joint\_limits.yaml.  
> [move\_group-1] [INFO] [1667831127.429069100] [moveit.plugins.moveit\_simple\_controller\_manager]: Returned 2 controllers in list  
> [move\_group-1] [INFO] [1667831127.429114800] [moveit.plugins.moveit\_simple\_controller\_manager]: Returned 2 controllers in list  
> [move\_group-1] [INFO] [1667831127.429220600] [moveit\_ros.trajectory\_execution\_manager]: Validating trajectory with allowed\_start\_tolerance 0.01  
> [move\_group-1] [INFO] [1667831127.440000800] [moveit\_ros.trajectory\_execution\_manager]: Starting trajectory execution …  
> [move\_group-1] [INFO] [1667831127.440665500] [moveit.plugins.moveit\_simple\_controller\_manager]: Returned 2 controllers in list  
> [move\_group-1] [INFO] [1667831127.440707000] [moveit.plugins.moveit\_simple\_controller\_manager]: Returned 2 controllers in list  
> [move\_group-1] [ERROR] [1667831127.441008500] [moveit.simple\_controller\_manager.follow\_joint\_trajectory\_controller\_handle]: Action client not connected to action server: scaled\_joint\_trajectory\_controller/follow\_joint\_trajectory  
> [move\_group-1] [ERROR] [1667831127.441031400] [moveit\_ros.trajectory\_execution\_manager]: Failed to send trajectory part 1 of 1 to controller scaled\_joint\_trajectory\_controller  
> [move\_group-1] [INFO] [1667831127.441043800] [moveit\_ros.trajectory\_execution\_manager]: Completed trajectory execution with status ABORTED …  
> [move\_group-1] [INFO] [1667831127.450343200] [moveit\_move\_group\_default\_capabilities.move\_action\_capability]: Solution found but controller failed during execution  
> [rviz2-2] [INFO] [1667831127.661182200] [move\_group\_interface]: Plan and Execute request aborted  
> [rviz2-2] [ERROR] [1667831127.761634400] [move\_group\_interface]: MoveGroupInterface::move() failed or timeout reached

Based on my earlier questions about whether some of my responses were normal or not, I have a feeling something is being lost in communication with the robot through WSL2. Thoughts

---

<div class="post-metadata">

**Author:** ![mauch](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@mauch](https://forum.universal-robots.com/u/mauch)\
**Post date:** [November 8, 2022, 12:50pm UTC](https://forum.universal-robots.com/t/ros2-ur10e-robot-position-updates-in-rviz-but-cannot-be-conrolled/24825/4 "2022-11-08T12:50:53Z")

</div>

> If I run the externalcontrol software on the pendent without running any ROS2 programs, I get a timeout on the pendent.
> 
> - Normal.

Yes, this is normal. The driver will open a port where the external\_control program node will connect to initially. This basically receives the URScript code from the ROS pc that will be running on the controller.

> ```auto
> ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur10e robot_ip:=192.168.1.102
> 
> ```
> 
> and then run the externalcontrol program on the UR10e, no timeout occurs
> 
> - Normal.

This means that the robot controller can actually connect to your host PC, on port 5002, as you have configured in the TP’s installation. On the driver’s shell you should see something like

```auto
[ur_ros2_control_node-1] [INFO] [1667911490.872676163] [UR_Client_Library]: Robot requested program
[ur_ros2_control_node-1] [INFO] [1667911490.872736828] [UR_Client_Library]: Sent program to robot

```

If not, your port forwarding is probably not working correctly. I am not familiar with WSL, so I won’t be able to help you with that, unfortunately.

> After running the externalcontrol program, there is no feedback in my WSL2 ROS2 terminal. Is this
> 
> - Normal?

As stated above, you should see some output when the program is started. Additionally, once the program is running (in fact, when the program is inside the external\_control node), you should see

```auto
[ur_ros2_control_node-1] [INFO] [1667911490.900446351] [UR_Client_Library]: Robot connected to reverse interface. Ready to receive control commands.

```

If you don’t see this, you won`t be able to control the robot, hence the `Controller is not running.` error.

> After running that command, Rviz2 will open up and it shows the robot in the position that the actual robot is in.
> 
> - Normal.
> 
> If I stop the externalcontrol software and manually move the robot arm, Rviz2 is updated with the new position in real time even though externalcontrol software is stopped.  
> Normal?

Sending status information from the robot to ROS is independent of the externalcontrol URCap. Hence, the robot’s joint state will show in RViz as long as the driver is running.

> If I kill the terminal such that no nodes are running while the externalcontrol program is still running, I do not get a timeout.
> 
> - Normal?

As explained above, the program code is queried once at the beginning. If you stop the driver, reads will timeout, but more silently. Depending on whether you loop your program, it will simply start from the top (in which case the program will show as running) or simply stop. No popup will be raised.

---

<div class="post-metadata">

**Author:** ![anon92354819](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@anon92354819](https://forum.universal-robots.com/u/anon92354819)\
**Post date:** [November 8, 2022, 1:18pm UTC](https://forum.universal-robots.com/t/ros2-ur10e-robot-position-updates-in-rviz-but-cannot-be-conrolled/24825/5 "2022-11-08T13:18:11Z")

</div>

Thank you for the detailed explanations for each of my questions. I have a feeling my port forwarding is either not set up correctly or the permissions on this machine are locked such that even if I setup portforwarding, it may not work as intended.

I will rerun these commands and look for the response examples you gave. I’ll also include rft files for each terminal in my next reply later this morning.

I’m also looking to piece together a dedicated linux machine from one of our lesser used lab computers to avoid this whole WSL2 business.

---

<div class="post-metadata">

**Author:** ![fabio.espinosa](https://avatars.discourse-cdn.com/v4/letter/f/ed655f/32.png) [@fabio.espinosa](https://forum.universal-robots.com/u/fabio.espinosa)\
**Post date:** [February 13, 2023, 11:57am UTC](https://forum.universal-robots.com/t/ros2-ur10e-robot-position-updates-in-rviz-but-cannot-be-conrolled/24825/6 "2023-02-13T11:57:49Z")

</div>

Did you manage to solve this? if not I recommend you check the driver’s bring\_up parameter reverse\_ip
