Skip to content

Instantly share code, notes, and snippets.

Avatar

DanielZeng pythongo1

View GitHub Profile
View display.launch
<launch>
<arg name="model" default="$(find urdf_tutorial)/urdf/01-myfirst.urdf"/>
<arg name="gui" default="false" />
<arg name="rvizconfig" default="$(find urdf_tutorial)/rviz/urdf.rviz" />
<param name="robot_description" command="$(find xacro)/xacro --inorder $(arg model)" />
<param name="use_gui" value="$(arg gui)"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
View for_report.urdf
<?xml version="1.0"?>
<robot name="man">
<material name="blue">
<color rgba="${68/255} ${108/255} ${179/255} 1"/>
</material>
<material name="yellow">
<color rgba="${238/255} ${238/255} ${0/255} 1"/>
View my_hand_check_version3_function.py
#!/usr/bin/env python
import rospy
from std_msgs.msg import Float64
from control_msgs.msg import JointControllerState
import math # for sin
import os
# for publish
finger5_0_publisher = 0
finger5_1_publisher = 0
View my_hand_check_version2.py
#!/usr/bin/env python
import rospy
from std_msgs.msg import Float64
from control_msgs.msg import JointControllerState
import math # for sin
finger5_0_process_value = 0
finger5_1_process_value = 0
finger4_0_process_value = 0
finger4_1_process_value = 0
View my_hand_check_version1.py
#!/usr/bin/env python
import rospy
from std_msgs.msg import Float64
from control_msgs.msg import JointControllerState
import math # for sin
process_value_data = 0
def callbackstate(subdata_state):
#rospy.loginfo("process value is %f", subdata_state.process_value)
View example12
<transmission name="finger5_trans">
<type>transmission_interface/SimpleTransmission</type>
<actuator name="finger5_motor">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="hand_base_to_finger5">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
</transmission>
View my_hand_check_version3_function_code.py
#!/usr/bin/env python
import rospy
from std_msgs.msg import Float64
from control_msgs.msg import JointControllerState
import math # for sin
import os
# for publish
finger5_0_publisher = 0
finger5_1_publisher = 0
View example11
<link name="finger5">
<visual>
<origin xyz="0 0.019427 0"/>
<geometry>
<!-- <box size="0.008 0.0355 0.008"/> -->
<mesh filename="package://rrbot_description/meshes/finger5_shell.dae" scale="1 1 1"/>
</geometry>
<material name="black"/>
</visual>
View my_hand_version4_mesh.xacro
<?xml version="1.0"?>
<!-- Revolute-Revolute Manipulator -->
<robot name="rrbot" xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- Constants for robot dimensions -->
<xacro:property name="PI" value="3.1415926535897931"/>
<!-- Import all Gazebo-customization elements, including Gazebo colors -->
<xacro:include filename="$(find rrbot_description)/urdf/rrbot.gazebo" />
View ask
<!-- real hand base -->
<!-- add collision --> <!-- test other collision -->
<link name="hand_base">
<visual>
<!-- final origin xyz "0 0.052 0" is because the length of thetwo hand_base -->
<!-- the number is to adjust the position of hand base 0.017738 -->
<!-- old <origin xyz="0 0.061515 0.018191" rpy="0 0 0"/> -->
<origin xyz="0 0.061515 0" rpy="0 0 0"/>
<geometry>
<!-- for big a bit --> <!-- <box size="0.05 0.1 0.01"/> -->
You can’t perform that action at this time.