how can i get Jacobian and Torque and Acceleration and Velocity in RViz?

asked 2016-11-10 10:41:26 -0500

zakizadeh gravatar image

updated 2016-11-10 16:44:37 -0500

how can i get Jacobian and Torque and Acceleration and Velocity in RViz? how to display a representation of these values in rviz? i can get posetion :

 #!/usr/bin/env python
"""
Display the current joint positions of the arm in kinematic order of the links

"""
import rospy, sys
import moveit_commander

from moveit_commander import MoveGroupCommander
class GetJointStates:
    def __init__(self):
        # Initialize the move_group API
        moveit_commander.roscpp_initialize(sys.argv)

        # Initialize the ROS node
        rospy.init_node('get_joint_states', anonymous=True)

    # Initialize the MoveIt! commander for the right arm
    right_arm = MoveGroupCommander('right_arm')

    # Get the end-effector link
    end_effector_link = right_arm.get_end_effector_link()

    # Joints are stored in the order they appear in the kinematic chain
    joint_names = right_arm.get_active_joints()

    joint_names = ['right_arm_shoulder_pan_joint',
                   'right_arm_shoulder_lift_joint',
                   'right_arm_shoulder_roll_joint',
                   'right_arm_elbow_flex_joint',
                   'right_arm_forearm_flex_joint',
                   'right_arm_wrist_flex_joint'
                   ]

    # Display the joint names
    rospy.loginfo("Joint names:\n"  + str(joint_names) + "\n")

    # Get the current joint angles
    joint_values = right_arm.get_current_joint_values()

    # Display the joint values
    rospy.loginfo("Joint values:\n"  + str(joint_values) + "\n")


# Get the end-effector pose
ee_pose = right_arm.get_current_pose(end_effector_link)

# Display the end-effector pose
rospy.loginfo("End effector pose:\n" + str(ee_pose))





    moveit_commande

r.roscpp_shutdown()
        moveit_commander.os._exit(0)

if __name__ == "__main__":
    GetJointStates()
edit retag flag offensive close merge delete

Comments

I'm confused by the question. Are you asking how to access Torque/Jacobian/velocity values in Python with MoveIt!, or are you asking how to display a representation of these values in rviz?

jarvisschultz gravatar image jarvisschultz  ( 2016-11-10 13:07:10 -0500 )edit

how to display a representation of these values in rviz?

zakizadeh gravatar image zakizadeh  ( 2016-11-10 15:36:26 -0500 )edit