Open danzimmerman opened 1 year ago
Very hacky (hardcoded entries for ur_description
, fragile if you want to use a custom description) but working on the dz/exp-joint-dyn-moveit branch
Hi @danzimmerman ,
i've seen you tried getting moveit to work. I tried to use your changes to this repo with the your version of the Universal Robots Gazebo Simulation Package. Because i'm getting an error while trying to launch it i thought i'd share it with you.
Heres my error:
ubuntu@ubuntu:~/Schreibtisch/ros2_ws$ ros2 launch ur_simulation_gazebo ur_sim_moveit.launch.py
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2023-06-03-09-20-21-353401-ubuntu-9842
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): executed command failed. Command: /opt/ros/humble/bin/xacro /home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/urdf/ur_gazebo_classic.urdf.xacro robot_ip:=xxx.yyy.zzz.www joint_limit_params:=/home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/config/ur5e/joint_limits.yaml kinematics_params:=/home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/config/ur5e/default_kinematics.yaml physical_params:=/home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/config/ur5e/physical_parameters.yaml visual_params:=/home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/config/ur5e/visual_parameters.yaml safety_limits:=true safety_pos_margin:=0.15 safety_k_position:=20 name:=ur ur_type:=ur5e script_filename:=ros_control.urscript input_recipe_filename:=rtde_input_recipe.txt output_recipe_filename:=rtde_output_recipe.txt prefix:=""
Captured stderr output: error: [Errno 2] No such file or directory: '/home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/config/ur5e/joint_limits.yaml'
when evaluating expression 'xacro.load_yaml(jnt_limits_file)['joint_limits']'
when evaluating expression 'dict( joint_dynamics=dict( shoulder_pan_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['shoulder_pan_joint']['max_effort']), shoulder_lift_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['shoulder_lift_joint']['max_effort']), elbow_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['elbow_joint']['max_effort']), wrist_1_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['wrist_1_joint']['max_effort']), wrist_2_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['wrist_2_joint']['max_effort']), wrist_3_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['wrist_3_joint']['max_effort'])))'
when evaluating expression 'joint_dyn_dict'
when processing file: /home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/urdf/ur_gazebo_classic.urdf.xacro
Hi @danzimmerman ,
So i noticed that i forgot to set the ur_type parameter in my last answer. I tried running it again with the parameter set. Unfortunately it also didn't work with the parameter set.
Heres what i got in my console:
ubuntu@ubuntu:~/Schreibtisch/ros2_ws$ ros2 launch ur_simulation_gazebo ur_sim_moveit.launch.py ur_type:=ur10
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2023-06-12-13-06-06-983996-ubuntu-15007
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): executed command failed. Command: /opt/ros/humble/bin/xacro /home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/urdf/ur_gazebo_classic.urdf.xacro robot_ip:=xxx.yyy.zzz.www joint_limit_params:=/home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/config/ur10/joint_limits.yaml kinematics_params:=/home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/config/ur10/default_kinematics.yaml physical_params:=/home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/config/ur10/physical_parameters.yaml visual_params:=/home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/config/ur10/visual_parameters.yaml safety_limits:=true safety_pos_margin:=0.15 safety_k_position:=20 name:=ur ur_type:=ur10 script_filename:=ros_control.urscript input_recipe_filename:=rtde_input_recipe.txt output_recipe_filename:=rtde_output_recipe.txt prefix:=""
Captured stderr output: error: [Errno 2] No such file or directory: '/home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/config/ur10/joint_limits.yaml'
when evaluating expression 'xacro.load_yaml(jnt_limits_file)['joint_limits']'
when evaluating expression 'dict( joint_dynamics=dict( shoulder_pan_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['shoulder_pan_joint']['max_effort']), shoulder_lift_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['shoulder_lift_joint']['max_effort']), elbow_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['elbow_joint']['max_effort']), wrist_1_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['wrist_1_joint']['max_effort']), wrist_2_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['wrist_2_joint']['max_effort']), wrist_3_joint=dict(damping=0.0, friction=fric_scale*jnt_limits['wrist_3_joint']['max_effort'])))'
when evaluating expression 'joint_dyn_dict'
when processing file: /home/ubuntu/Schreibtisch/ros2_ws/install/ur_simulation_gazebo/share/ur_simulation_gazebo/urdf/ur_gazebo_classic.urdf.xacro
Just to verify, you checked out and built the dz/exp-joint-dyn-moveit branch?
Oh no, i just overlooked that there was a new branch. Sorry!
Edit: So now i've checked out the new branch and tried running moveit with it. It launched without any major errors ans i saw the robot in Gazebo and Rviz ( the one without moveit) but i didn't see it in the Moveit-Rviz-Window. Here's my terminal output:
Yeah so i retried running it today and tried to tweak some strings in my system for maximum performance (i thought maybe i have some issues showing and rendering the model in 3 different Windows) but unfortunately that didn't help. Output is still the same as in the Edit if my last post.
I think this is the issue:
[rviz2-8] [ERROR] [1686572229.353066777] [moveit_background_processing.background_processing]:
Exception caught while processing action 'loadRobotModel':
parameter 'robot_description_kinematics.ur_manipulator.kinematics_solver_timeout' has invalid type:
Wrong parameter type, parameter {robot_description_kinematics.ur_manipulator.kinematics_solver_timeout}
is of type {double}, setting it to {string} is not allowed.
I'd check your kinematics.yaml
to make sure you have a floating point number for kinematics_solver_timeout (here) but if that's correct or you didn't change it, unfortunately I think this might be an issue with locales.
Apparently you need to be using the en_US.UTF-8 locale, see
https://github.com/ros-planning/moveit2/issues/1049#issuecomment-1047029751
https://github.com/ros/urdfdom_headers/issues/41
https://github.com/ros-visualization/rviz/issues/1151#issuecomment-345687074
In my case it was a problem with locales. urdfdom_headers uses std:stod to parse floating point values from urdf files. std:stod is depending on your locale. In that light, what @JanGunheD posted makes absolutely sense. This error cuts all values below one to zero. Could somebody check if changing the locale LC_NUMERIC to e.g. en_US.UTF-8 fixes this error, as it does on my end? You could run export LC_NUMERIC="en_US.UTF-8 for testing.
Great thank you so much! The ˋLC_NUMERIC=en_US.UTF-8 ros2 launchˋ approach worked for me just fine! I'm really thankful that it works now!
I'm opening this and closing #1.
The MoveIt launch file doesn't pick up the correct
.xacro
files, so the robot's joints break in Gazebo when trying to control it with MoveIt.