ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Simulated real hardware not updating position ros2, moveit, rviz

asked 2023-04-07 11:46:46 -0500

Pelle gravatar image

Please let me know if there is any additional information you may need.

Hello! I am new here and was hoping to get some help getting started, I have spent two weeks trying to get up and running but am not getting anywhere. I am using ur_robot_driver and the installation of ros2 humble and the driver went great. Afterwards I pulled the docker image for the simulation from here ( ) and promptly ran it and checked if URcap was there (and it was).

I started the URsim with

ros2 run ur_robot_driver -m ur5

as their site suggests. It loaded polyscope and it all works fine. Ran the driver with

ros2 launch ur_robot_driver ur_type:=ur5 robot_ip:=

and it mirrored in rviz! I tried moving it a little in polyscope and it is indeed publishing the joint state data. What happens next feels like a road block to me. The "scaled_joint_trajectory_controller" is there when running

ros2 node list

but it isn't active so I have to activate it manually (which is fine). I then end it with running the trajectory controller to test things out

ros2 run rqt_joint_trajectory_controller rqt_joint_trajectory_controller

But when touching the sliders nothing is reflected in the URsim robot. Of course if I skip the URsim part entirely and run the driver with fake hardware, the joint_trajectory_controller is active from the get go (not scaled) and touching the sliders make the arm move in rviz.

It is really a struggle but I must assume it has to do with that the controller isnt starting by itself properly? After all, when running the driver it does say configured and activated but yet I gotta do it manually afterwards anyway. With moveit attached it can plan and send the trajectory to the scaled_joint_trajectory_controller but nothing happens. I am at my wits end and help is massivly appreciated. I just want it to move so I know the workspace is ready for real hardware.

[spawner-10] [INFO] [1680884526.935139591] [spawner_scaled_joint_trajectory_controller]: Configured and activated scaled_joint_trajectory_controller


I was following this

many, many thanks even for tiny ideas

edit retag flag offensive close merge delete



Did you make a Polyscope program that used the node from the external control URCap and then run that program?

URSim will publish joint data from boot, but it won't respond to external control commands without a running program with the external control node. I don't remember if that's set up out of the box, I think I had to configure the URCap and write the simple program that just consists of the External Control node. Touching anything in Polyscope like the robot jog will also stop the program from running and require that you hit "play" again to resume external control.

danzimmerman gravatar image danzimmerman  ( 2023-04-10 15:18:28 -0500 )edit

You are a saint! I did all the external program things but I guess it must have exited itself when I was shifting around in Polyscope. It works now if I just leave it after pressing "play". Thank you so much!

Pelle gravatar image Pelle  ( 2023-04-11 09:18:10 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2023-04-11 09:18:46 -0500

Pelle gravatar image

updated 2023-04-11 09:19:06 -0500

Turns out the external control program stopped when doing other stuff in Polyscope. Fixed by leaving it be after pressing "play". Thanks to danzimmerman!

edit flag offensive delete link more

Question Tools


Asked: 2023-04-07 11:46:46 -0500

Seen: 272 times

Last updated: Apr 11