Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm.get_current_pose() results in ERROR: "Failed to fetch current robot state" #97

Open
FlurinArner opened this issue Dec 12, 2017 · 2 comments

Comments

@FlurinArner
Copy link

Description

When requesting the current pose from the MoveGroupCommander("manipulator") through the get_current_pose() Function, the function fails.
At first I thought it was related to an issue with moveit_planner, but if I build their source for moveit, the "Found empty JointState message" disappears, while this issue remains.
As soon as ROS Answers is back up, I'm going to post a question there and link it on&to this page.

Your Environment

  • ROS Distro: Kinetic
  • OS Version: Ubuntu 16.04
  • Source or Binary build?: Binary build for ROS, then source build for denso:kinetic-devel with commit: 3e725b1

Steps to reproduce

  • Create and move to workspace source folder:
    mkdir -p denso_kinetic_devel_ws/src
    cd denso_kinetic_devel_ws/src
  • Download source for denso:kinetic-devel:
    git clone [email protected]:start-jsk/denso.git
  • Edit following python script with preferred editor:
    denso/vs060/scripts/irex_demo_noteaching.py
  • Add in lines (after line 94: arm.go() or arm.go() or rospy.logerr("arm.go fails") ):
    current_pose = arm.get_current_pose()
    rospy.loginfo("Current pose: \n{}".format(current_pose.pose))
  • Save file.
  • Build workspace:
    cd ..
    catkin_make
  • Source workspace:
    source devel/setup.bash
  • Run launchfile:
    roslaunch vs060_moveit_config demo_simulation_cage.launch

Expected behavior

arm.get_current_pose() returns the current pose of the end_effector (Flange in denso's case)

Actual behavior

Error message:

[ERROR] [1513090715.277469722]: Failed to fetch current robot state

Console output

logfile_for_issue_2.txt
(I only removed username@computername references)

@FlurinArner
Copy link
Author

Following this answer was finally able to solve the problem by editing the launchfile:

  • In denso/vs060_moveit_config/launch/demo_simulation_cage.launch, after line 8:
    <node name="spawn_cage" pkg="vs060" type="irex_demo_noteaching.py" />

  • Add the following lines:
    <node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher" output="screen">
    <param name="publish_frequency" type="double" value="30.0" />
    <rosparam param="/source_list"> [/arm_controller/joint_states] </rosparam>
    </node>

Now the current_pose is returned and all works, but this feels much like a hack around the problem.
I doesn't make sense to publish the same information for joint_states, under two separate topics (/joint_states and /arm_controller/joint_states).
Maybe this is more of a problem with moveit_commander, than with denso..
Feel free to close this "Issue", and I'll be asking the same question on answers.ros.org

@Heisenberg1997
Copy link

can you give a more detail Introduction about that. I have the same problem and I don't know the which joint pub need change. please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants