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

Revision history [back]

click to hide/show revision 1
initial version

For anyone that wants to do the same thing: What I have decided to do now is changing the max_velocity in joint_limits.yaml (from moveit_config, created from setup assistant). I still need to have the set the speed scaling to 100%, but now the robot moves slower. In rviz under planning one can also set the velocity factor (from 0 - 1). That worked for plans created in rviz, but not through a C++ file.

For anyone that wants to do the same thing: What I have decided to do now is changing the max_velocity in joint_limits.yaml (from moveit_config, created from setup assistant). I still need to have the set the speed scaling to 100%, but now the robot moves slower. In rviz under planning one can also set the velocity factor (from 0 - 1). That worked for plans created in rviz, but not through a C++ file.

Second option: Use /ur_hardware_interface/set_speed_slider topic to change speed scaling value. Use trajectory from MoveIt and convert it from moveit_msgs::RobotTrajector to control_msgs::FollowJointTrajectoryGoal.

moveit_msgs::RobotTrajectory trajectory;
trajectory_msgs::JointTrajectory joints_combined = trajectory.joint_trajectory;
control_msgs::FollowJointTrajectoryGoal goal;
goal.trajectory = joints_combined;
goal.goal_time_tolerance = ros::Duration(1.0);

This can then be send to robot via action client and won't stop because of slow execution.

actionlib::SimpleActionClient<control_msgs::FollowJointTrajectoryAction> ac("/scaled_pos_joint_traj_controller/follow_joint_trajectory", true);
 ac.sendGoal(goal);