turtlebot / turtlebot_arm

The turtlebot_arm package provides bringup, description, and utilities for using the TurtleBot arm.
BSD 3-Clause "New" or "Revised" License
49 stars 43 forks source link

How to control the arm ??? with moveit #32

Closed Abduoit closed 6 years ago

Abduoit commented 7 years ago

I run arbotix_terminal and I detect my five servos

Then, I run roslaunch turtlebot_arm_bringup arm.launch until I see [INFO] [1506951666.556013]: ArbotiX connected

But when I run roslaunch turtlebot_arm_moveit_config turtlebot_arm_moveit.launch I get the following error, Please tell me how to control the arm ?? by rviz or moveit ???

abdulrahman@abdulrahman-ThinkPad-X230-Tablet:~$ roslaunch turtlebot_arm_moveit_config turtlebot_arm_moveit.launch 
... logging to /home/abdulrahman/.ros/log/aa1bb15c-a77d-11e7-a80b-e09d31097f54/roslaunch-abdulrahman-ThinkPad-X230-Tablet-3150.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://abdulrahman-ThinkPad-X230-Tablet:35791/

SUMMARY
========

PARAMETERS
 * /joint_state_publisher/use_gui: False
 * /move_group/allow_trajectory_execution: True
 * /move_group/arm/planner_configs: ['SBLkConfigDefau...
 * /move_group/controller_list: [{'joints': ['arm...
 * /move_group/gripper/planner_configs: ['SBLkConfigDefau...
 * /move_group/jiggle_fraction: 0.05
 * /move_group/max_range: 5.0
 * /move_group/max_safe_path_cost: 1
 * /move_group/moveit_controller_manager: moveit_fake_contr...
 * /move_group/moveit_manage_controllers: True
 * /move_group/octomap_resolution: 0.025
 * /move_group/planner_configs/BFMTkConfigDefault/balanced: 0
 * /move_group/planner_configs/BFMTkConfigDefault/cache_cc: 1
 * /move_group/planner_configs/BFMTkConfigDefault/extended_fmt: 1
 * /move_group/planner_configs/BFMTkConfigDefault/heuristics: 1
 * /move_group/planner_configs/BFMTkConfigDefault/nearest_k: 1
 * /move_group/planner_configs/BFMTkConfigDefault/num_samples: 1000
 * /move_group/planner_configs/BFMTkConfigDefault/optimality: 1
 * /move_group/planner_configs/BFMTkConfigDefault/radius_multiplier: 1.0
 * /move_group/planner_configs/BFMTkConfigDefault/type: geometric::BFMT
 * /move_group/planner_configs/BKPIECEkConfigDefault/border_fraction: 0.9
 * /move_group/planner_configs/BKPIECEkConfigDefault/failed_expansion_score_factor: 0.5
 * /move_group/planner_configs/BKPIECEkConfigDefault/min_valid_path_fraction: 0.5
 * /move_group/planner_configs/BKPIECEkConfigDefault/range: 0.0
 * /move_group/planner_configs/BKPIECEkConfigDefault/type: geometric::BKPIECE
 * /move_group/planner_configs/BiESTkConfigDefault/range: 0.0
 * /move_group/planner_configs/BiESTkConfigDefault/type: geometric::BiEST
 * /move_group/planner_configs/BiTRRTkConfigDefault/cost_threshold: 1e300
 * /move_group/planner_configs/BiTRRTkConfigDefault/frountier_node_ratio: 0.1
 * /move_group/planner_configs/BiTRRTkConfigDefault/frountier_threshold: 0.0
 * /move_group/planner_configs/BiTRRTkConfigDefault/init_temperature: 100
 * /move_group/planner_configs/BiTRRTkConfigDefault/range: 0.0
 * /move_group/planner_configs/BiTRRTkConfigDefault/temp_change_factor: 0.1
 * /move_group/planner_configs/BiTRRTkConfigDefault/type: geometric::BiTRRT
 * /move_group/planner_configs/ESTkConfigDefault/goal_bias: 0.05
 * /move_group/planner_configs/ESTkConfigDefault/range: 0.0
 * /move_group/planner_configs/ESTkConfigDefault/type: geometric::EST
 * /move_group/planner_configs/FMTkConfigDefault/cache_cc: 1
 * /move_group/planner_configs/FMTkConfigDefault/extended_fmt: 1
 * /move_group/planner_configs/FMTkConfigDefault/heuristics: 0
 * /move_group/planner_configs/FMTkConfigDefault/nearest_k: 1
 * /move_group/planner_configs/FMTkConfigDefault/num_samples: 1000
 * /move_group/planner_configs/FMTkConfigDefault/radius_multiplier: 1.1
 * /move_group/planner_configs/FMTkConfigDefault/type: geometric::FMT
 * /move_group/planner_configs/KPIECEkConfigDefault/border_fraction: 0.9
 * /move_group/planner_configs/KPIECEkConfigDefault/failed_expansion_score_factor: 0.5
 * /move_group/planner_configs/KPIECEkConfigDefault/goal_bias: 0.05
 * /move_group/planner_configs/KPIECEkConfigDefault/min_valid_path_fraction: 0.5
 * /move_group/planner_configs/KPIECEkConfigDefault/range: 0.0
 * /move_group/planner_configs/KPIECEkConfigDefault/type: geometric::KPIECE
 * /move_group/planner_configs/LBKPIECEkConfigDefault/border_fraction: 0.9
 * /move_group/planner_configs/LBKPIECEkConfigDefault/min_valid_path_fraction: 0.5
 * /move_group/planner_configs/LBKPIECEkConfigDefault/range: 0.0
 * /move_group/planner_configs/LBKPIECEkConfigDefault/type: geometric::LBKPIECE
 * /move_group/planner_configs/LBTRRTkConfigDefault/epsilon: 0.4
 * /move_group/planner_configs/LBTRRTkConfigDefault/goal_bias: 0.05
 * /move_group/planner_configs/LBTRRTkConfigDefault/range: 0.0
 * /move_group/planner_configs/LBTRRTkConfigDefault/type: geometric::LBTRRT
 * /move_group/planner_configs/LazyPRMkConfigDefault/range: 0.0
 * /move_group/planner_configs/LazyPRMkConfigDefault/type: geometric::LazyPRM
 * /move_group/planner_configs/LazyPRMstarkConfigDefault/type: geometric::LazyPR...
 * /move_group/planner_configs/PDSTkConfigDefault/type: geometric::PDST
 * /move_group/planner_configs/PRMkConfigDefault/max_nearest_neighbors: 10
 * /move_group/planner_configs/PRMkConfigDefault/type: geometric::PRM
 * /move_group/planner_configs/PRMstarkConfigDefault/type: geometric::PRMstar
 * /move_group/planner_configs/ProjESTkConfigDefault/goal_bias: 0.05
 * /move_group/planner_configs/ProjESTkConfigDefault/range: 0.0
 * /move_group/planner_configs/ProjESTkConfigDefault/type: geometric::ProjEST
 * /move_group/planner_configs/RRTConnectkConfigDefault/range: 0.0
 * /move_group/planner_configs/RRTConnectkConfigDefault/type: geometric::RRTCon...
 * /move_group/planner_configs/RRTkConfigDefault/goal_bias: 0.05
 * /move_group/planner_configs/RRTkConfigDefault/range: 0.0
 * /move_group/planner_configs/RRTkConfigDefault/type: geometric::RRT
 * /move_group/planner_configs/RRTstarkConfigDefault/delay_collision_checking: 1
 * /move_group/planner_configs/RRTstarkConfigDefault/goal_bias: 0.05
 * /move_group/planner_configs/RRTstarkConfigDefault/range: 0.0
 * /move_group/planner_configs/RRTstarkConfigDefault/type: geometric::RRTstar
 * /move_group/planner_configs/SBLkConfigDefault/range: 0.0
 * /move_group/planner_configs/SBLkConfigDefault/type: geometric::SBL
 * /move_group/planner_configs/SPARSkConfigDefault/dense_delta_fraction: 0.001
 * /move_group/planner_configs/SPARSkConfigDefault/max_failures: 1000
 * /move_group/planner_configs/SPARSkConfigDefault/sparse_delta_fraction: 0.25
 * /move_group/planner_configs/SPARSkConfigDefault/stretch_factor: 3.0
 * /move_group/planner_configs/SPARSkConfigDefault/type: geometric::SPARS
 * /move_group/planner_configs/SPARStwokConfigDefault/dense_delta_fraction: 0.001
 * /move_group/planner_configs/SPARStwokConfigDefault/max_failures: 5000
 * /move_group/planner_configs/SPARStwokConfigDefault/sparse_delta_fraction: 0.25
 * /move_group/planner_configs/SPARStwokConfigDefault/stretch_factor: 3.0
 * /move_group/planner_configs/SPARStwokConfigDefault/type: geometric::SPARStwo
 * /move_group/planner_configs/STRIDEkConfigDefault/degree: 16
 * /move_group/planner_configs/STRIDEkConfigDefault/estimated_dimension: 0.0
 * /move_group/planner_configs/STRIDEkConfigDefault/goal_bias: 0.05
 * /move_group/planner_configs/STRIDEkConfigDefault/max_degree: 18
 * /move_group/planner_configs/STRIDEkConfigDefault/max_pts_per_leaf: 6
 * /move_group/planner_configs/STRIDEkConfigDefault/min_degree: 12
 * /move_group/planner_configs/STRIDEkConfigDefault/min_valid_path_fraction: 0.2
 * /move_group/planner_configs/STRIDEkConfigDefault/range: 0.0
 * /move_group/planner_configs/STRIDEkConfigDefault/type: geometric::STRIDE
 * /move_group/planner_configs/STRIDEkConfigDefault/use_projected_distance: 0
 * /move_group/planner_configs/TRRTkConfigDefault/frountierNodeRatio: 0.1
 * /move_group/planner_configs/TRRTkConfigDefault/frountier_threshold: 0.0
 * /move_group/planner_configs/TRRTkConfigDefault/goal_bias: 0.05
 * /move_group/planner_configs/TRRTkConfigDefault/init_temperature: 10e-6
 * /move_group/planner_configs/TRRTkConfigDefault/k_constant: 0.0
 * /move_group/planner_configs/TRRTkConfigDefault/max_states_failed: 10
 * /move_group/planner_configs/TRRTkConfigDefault/min_temperature: 10e-10
 * /move_group/planner_configs/TRRTkConfigDefault/range: 0.0
 * /move_group/planner_configs/TRRTkConfigDefault/temp_change_factor: 2.0
 * /move_group/planner_configs/TRRTkConfigDefault/type: geometric::TRRT
 * /move_group/planning_plugin: ompl_interface/OM...
 * /move_group/planning_scene_monitor/publish_geometry_updates: True
 * /move_group/planning_scene_monitor/publish_planning_scene: True
 * /move_group/planning_scene_monitor/publish_state_updates: True
 * /move_group/planning_scene_monitor/publish_transforms_updates: True
 * /move_group/request_adapters: default_planner_r...
 * /move_group/start_state_max_bounds_error: 0.1
 * /move_group/trajectory_execution/allowed_execution_duration_scaling: 1.2
 * /move_group/trajectory_execution/allowed_goal_duration_margin: 0.5
 * /move_group/trajectory_execution/allowed_start_tolerance: 0.01
 * /robot_description: <?xml version="1....
 * /robot_description_kinematics/arm/kinematics_solver: turtlebot_arm_arm...
 * /robot_description_kinematics/arm/kinematics_solver_attempts: 3
 * /robot_description_kinematics/arm/kinematics_solver_search_resolution: 0.005
 * /robot_description_kinematics/arm/kinematics_solver_timeout: 0.005
 * /robot_description_planning/joint_limits/arm_elbow_flex_joint/has_acceleration_limits: False
 * /robot_description_planning/joint_limits/arm_elbow_flex_joint/has_velocity_limits: True
 * /robot_description_planning/joint_limits/arm_elbow_flex_joint/max_acceleration: 0
 * /robot_description_planning/joint_limits/arm_elbow_flex_joint/max_velocity: 1.571
 * /robot_description_planning/joint_limits/arm_shoulder_lift_joint/has_acceleration_limits: False
 * /robot_description_planning/joint_limits/arm_shoulder_lift_joint/has_velocity_limits: True
 * /robot_description_planning/joint_limits/arm_shoulder_lift_joint/max_acceleration: 0
 * /robot_description_planning/joint_limits/arm_shoulder_lift_joint/max_velocity: 1.571
 * /robot_description_planning/joint_limits/arm_shoulder_pan_joint/has_acceleration_limits: False
 * /robot_description_planning/joint_limits/arm_shoulder_pan_joint/has_velocity_limits: True
 * /robot_description_planning/joint_limits/arm_shoulder_pan_joint/max_acceleration: 0
 * /robot_description_planning/joint_limits/arm_shoulder_pan_joint/max_velocity: 1.571
 * /robot_description_planning/joint_limits/arm_wrist_flex_joint/has_acceleration_limits: False
 * /robot_description_planning/joint_limits/arm_wrist_flex_joint/has_velocity_limits: True
 * /robot_description_planning/joint_limits/arm_wrist_flex_joint/max_acceleration: 0
 * /robot_description_planning/joint_limits/arm_wrist_flex_joint/max_velocity: 1.571
 * /robot_description_planning/joint_limits/gripper_joint/has_acceleration_limits: False
 * /robot_description_planning/joint_limits/gripper_joint/has_velocity_limits: True
 * /robot_description_planning/joint_limits/gripper_joint/max_acceleration: 0
 * /robot_description_planning/joint_limits/gripper_joint/max_velocity: 0.785
 * /robot_description_planning/joint_limits/gripper_link_joint/has_acceleration_limits: False
 * /robot_description_planning/joint_limits/gripper_link_joint/has_velocity_limits: True
 * /robot_description_planning/joint_limits/gripper_link_joint/max_acceleration: 0
 * /robot_description_planning/joint_limits/gripper_link_joint/max_velocity: 1
 * /robot_description_semantic: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.7
 * /rviz_abdulrahman_ThinkPad_X230_Tablet_3150_8056263447110076151/arm/kinematics_solver: turtlebot_arm_arm...
 * /rviz_abdulrahman_ThinkPad_X230_Tablet_3150_8056263447110076151/arm/kinematics_solver_attempts: 3
 * /rviz_abdulrahman_ThinkPad_X230_Tablet_3150_8056263447110076151/arm/kinematics_solver_search_resolution: 0.005
 * /rviz_abdulrahman_ThinkPad_X230_Tablet_3150_8056263447110076151/arm/kinematics_solver_timeout: 0.005
 * /source_list: ['/move_group/fak...

NODES
  /
    joint_state_publisher (joint_state_publisher/joint_state_publisher)
    move_group (moveit_ros_move_group/move_group)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    rviz_abdulrahman_ThinkPad_X230_Tablet_3150_8056263447110076151 (rviz/rviz)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[joint_state_publisher-1]: started with pid [3172]
process[robot_state_publisher-2]: started with pid [3173]
process[move_group-3]: started with pid [3174]
process[rviz_abdulrahman_ThinkPad_X230_Tablet_3150_8056263447110076151-4]: started with pid [3182]
[ INFO] [1506954415.663253112]: Loading robot model 'turtlebot_arm'...
[ INFO] [1506954415.663592667]: No root/virtual joint specified in SRDF. Assuming fixed joint
[ INFO] [1506954415.730456015]: rviz version 1.12.10
[ INFO] [1506954415.730502900]: compiled against Qt version 5.5.1
[ INFO] [1506954415.730521112]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1506954415.764070772]: arm_shoulder_pan_joint -2.617 2.617 1
[ INFO] [1506954415.764167415]: arm_shoulder_lift_joint -2.617 2.617 1
[ INFO] [1506954415.764219931]: arm_elbow_flex_joint -2.617 2.617 1
[ INFO] [1506954415.764269923]: arm_wrist_flex_joint -1.745 1.745 1
[ INFO] [1506954415.764319877]: gripper_link_joint -3.14 3.14 1
[ INFO] [1506954415.793705372]: Publishing maintained planning scene on 'monitored_planning_scene'
[ INFO] [1506954415.799552869]: MoveGroup debug mode is ON
Starting context monitors...
[ INFO] [1506954415.799644522]: Starting scene monitor
[ INFO] [1506954415.804215477]: Listening to '/planning_scene'
[ INFO] [1506954415.804295494]: Starting world geometry monitor
[ INFO] [1506954415.808632699]: Listening to '/collision_object' using message notifier with target frame '/base_link '
[ INFO] [1506954415.813097515]: Listening to '/planning_scene_world' for planning scene world geometry
[ INFO] [1506954415.844158248]: Listening to '/attached_collision_object' for attached collision objects
Context monitors started.
[ INFO] [1506954415.908991778]: Initializing OMPL interface using ROS parameters
[ INFO] [1506954415.950697547]: Using planning interface 'OMPL'
[ INFO] [1506954415.992013862]: Param 'default_workspace_bounds' was not set. Using default value: 10
[ INFO] [1506954415.993102403]: Param 'start_state_max_bounds_error' was set to 0.1
[ INFO] [1506954415.994040546]: Param 'start_state_max_dt' was not set. Using default value: 0.5
[ INFO] [1506954415.994944155]: Param 'start_state_max_dt' was not set. Using default value: 0.5
[ INFO] [1506954415.995921021]: Param 'jiggle_fraction' was set to 0.05
[ INFO] [1506954415.996493366]: Param 'max_sampling_attempts' was not set. Using default value: 100
[ INFO] [1506954415.996555243]: Using planning request adapter 'Add Time Parameterization'
[ INFO] [1506954415.996582120]: Using planning request adapter 'Fix Workspace Bounds'
[ INFO] [1506954415.996607920]: Using planning request adapter 'Fix Start State Bounds'
[ INFO] [1506954415.996629761]: Using planning request adapter 'Fix Start State In Collision'
[ INFO] [1506954415.996653164]: Using planning request adapter 'Fix Start State Path Constraints'
[ INFO] [1506954416.035660329]: Fake controller 'fake_arm_controller' with joints [ arm_shoulder_pan_joint arm_shoulder_lift_joint arm_elbow_flex_joint arm_wrist_flex_joint gripper_link_joint ]
[ INFO] [1506954416.036256393]: Fake controller 'fake_gripper_controller' with joints [ gripper_joint ]
[ INFO] [1506954416.036725996]: Returned 2 controllers in list
[ INFO] [1506954416.049330671]: Trajectory execution is managing controllers
[ INFO] [1506954416.073566553]: Stereo is NOT SUPPORTED
[ INFO] [1506954416.073662947]: OpenGl version: 3 (GLSL 1.3).
Loading 'move_group/ApplyPlanningSceneService'...
Loading 'move_group/ClearOctomapService'...
Loading 'move_group/MoveGroupCartesianPathService'...
Loading 'move_group/MoveGroupExecuteTrajectoryAction'...
Loading 'move_group/MoveGroupGetPlanningSceneService'...
Loading 'move_group/MoveGroupKinematicsService'...
Loading 'move_group/MoveGroupMoveAction'...
Loading 'move_group/MoveGroupPickPlaceAction'...
Loading 'move_group/MoveGroupPlanService'...
Loading 'move_group/MoveGroupQueryPlannersService'...
Loading 'move_group/MoveGroupStateValidationService'...
[ INFO] [1506954416.216453893]: 

********************************************************
* MoveGroup using: 
*     - ApplyPlanningSceneService
*     - ClearOctomapService
*     - CartesianPathService
*     - ExecuteTrajectoryAction
*     - GetPlanningSceneService
*     - KinematicsService
*     - MoveAction
*     - PickPlaceAction
*     - MotionPlanService
*     - QueryPlannersService
*     - StateValidationService
********************************************************

[ INFO] [1506954416.216574010]: MoveGroup context using planning plugin ompl_interface/OMPLPlanner
[ INFO] [1506954416.216614559]: MoveGroup context initialization complete

You can start planning now!

terminate called after throwing an instance of 'Ogre::Exception'
  what():  OGRE EXCEPTION(5:): Could not find font Liberation Sans in MovableText::setFontName
[rviz_abdulrahman_ThinkPad_X230_Tablet_3150_8056263447110076151-4] process has died [pid 3182, exit code -6, cmd /opt/ros/kinetic/lib/rviz/rviz -d /home/abdulrahman/catkin_ws/src/turtlebot_arm/turtlebot_arm_moveit_config/launch/moveit.rviz __name:=rviz_abdulrahman_ThinkPad_X230_Tablet_3150_8056263447110076151 __log:=/home/abdulrahman/.ros/log/aa1bb15c-a77d-11e7-a80b-e09d31097f54/rviz_abdulrahman_ThinkPad_X230_Tablet_3150_8056263447110076151-4.log].
log file: /home/abdulrahman/.ros/log/aa1bb15c-a77d-11e7-a80b-e09d31097f54/rviz_abdulrahman_ThinkPad_X230_Tablet_3150_8056263447110076151-4*.log
Zabot commented 7 years ago

This looks like an issue with rviz. Try removing the rviz launch from turtlebot_arm_moveit.launch and see if the launch still crashes. If it doesn't try reinstalling rviz.

  <!-- Run Rviz and load the default config to see the state of the move_group node -->
  <include file="$(find turtlebot_arm_moveit_config)/launch/moveit_rviz.launch">
    <arg name="config" value="true"/>
    <arg name="debug" value="$(arg debug)"/>
  </include>
Abduoit commented 7 years ago

Thanks @Zabot

Now, I got rviz and moveit. BUT when I change the virtual arm and press plan and execute, the actual arm is not moving. ??

corot commented 7 years ago

Well, many different things can be happening here... can you provide more details, mostly the log. Basic checks:

Abduoit commented 7 years ago

@corot

-The arm in rviz with its real physical position, I moved the physical arm and I saw its moving in rviz.

I got window of actionlib/TwoIntsAction GUI Client. Gaol says a:0, and b:0

-I don't know how to check your last suggestion Is MoveIt handling the trajectory controller? (check for example with rostopic info the action goal, if MoveIt is publishing to it

corot commented 7 years ago

I mean, you can check if moveit publishes on your arm contoler action server, e.g.

rostopic info /arm_controller/follow_joint_trajectory/goal

if so, echo the goal when you send one on RViz

rostopic echo /arm_controller/follow_joint_trajectory/goal

For sending a goal to the controller, you can use

rosrun actionlib axclient.py /arm_controller/follow_joint_trajectory

but it's true it will be very tedious to specify a joint trajectory, so better try to make RViz MoveIt plugin work, or try to command the arm using code. You can find an example in python here.

huseyin26es commented 6 years ago

Hi Did you solve this problem? I have a same problem with yours, i coould not still handle it.

corot commented 6 years ago

Hi, I cannot fix something I cannot reproduce. Please follow the checks in my previous comment and report here the outcome.

huseyin26es commented 6 years ago

rostopic info /arm_controller/follow_joint_trajectory/goal

output : Type: control_msgs/FollowJointTrajectoryActionGoal

Publishers: None

Subscribers:

why the publisher is none , do you have any idea ?

corot commented 6 years ago

So MoveIt! is not connected to the arm controller action server. Any error in the log?

huseyin26es commented 6 years ago

now , i can control arm with arbotix_gui command. What exactly do you mean with log ?

huseyin26es commented 6 years ago

and why moveit not is connecting arm, i think i did everything correct.

corot commented 6 years ago

Well,,, Publishers: None means MoveIt! is not sending goals to the arm

arbotix_gui is different because it talks directly to every joint, not the FollowJointTrajectory controller

huseyin26es commented 6 years ago

yes , i understand now. What should i do now for controlling in MoveIt! ?

corot commented 6 years ago

Unless there's an error, it should just happen. Check the log for errors. I'll take a look later. You launch :

roslaunch turtlebot_arm_moveit_config turtlebot_arm_moveit.launch

right?

corot commented 6 years ago

Hi, I think I found your problem; you must add sim:=false to your launch command. If not, you are using MoveIt! just to command a "virtual" arm, not your real one. So try to launch:

roslaunch turtlebot_arm_moveit_config turtlebot_arm_moveit.launch sim:=false

huseyin26es commented 6 years ago

Yes you are right, i did and it moves the robot :D Thanks a lot .