blog_20160515_1_5036361 73行 html/xml
Raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
<launch>
<!-- Make sure we are not using simulated time -->
<param name="/use_sim_time" value="false" />

<!-- Launch the arbotix driver in fake mode by default -->
<arg name="sim" default="true" />

<!-- If using a real controller, look on /dev/ttyUSB0 by default -->
<arg name="port" default="/dev/ttyUSB0" />

<!-- Load the URDF/Xacro model of our robot -->
<param name="robot_description" command="$(find xacro)/xacro.py '$(find youbot_description)/robots/youbot.urdf.xacro'" />
<param name="use_gui" value="true"/>

<node name="rviz" pkg="rviz" type="rviz" />

<!-- <include file="$(find urdf_tutorial)/launch/display.launch" />-->

<!-- Bring up the arbotix driver with a configuration file appropriate to the robot -->
<node name="arbotix" pkg="arbotix_python" type="arbotix_driver" clear_params="true" output="screen">
<rosparam file="$(find rbx2_bringup)/config/fake_youbot_arbotix.yaml" command="load" />
<param name="sim" value="$(arg sim)" />
<param name="port" value="$(arg port)" />
</node>

<!-- Run a separate controller for the one sided gripper -->
<node name="right_gripper_controller" pkg="arbotix_controllers" type="gripper_controller" output="screen">
<rosparam>
model: dualservo
min_opening: 0.0
max_opening: 0.009
invert_left: false
invert_right: false
center_left: 0.0
center_right: 0.0
pad_width: 0.015
finger_length: 0.04
joint_left: gripper_finger_joint_l
joint_right: gripper_finger_joint_r
</rosparam>
</node>

<!-- Publish the robot state -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher">
<param name="publish_frequency" type="double" value="20.0" />
</node>

<!-- <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />-->

<!-- Start all servos in a relaxed state -->
<node pkg="rbx2_dynamixels" type="arbotix_relax_all_servos.py" name="relax_all_servos" unless="$(arg sim)" />

<!-- Load diagnostics -->
<node pkg="diagnostic_aggregator" type="aggregator_node" name="diagnostic_aggregator" clear_params="true" unless="$(arg sim)">
<rosparam command="load" file="$(find rbx2_dynamixels)/config/dynamixel_diagnostics.yaml" />
</node>

<node pkg="rqt_robot_monitor" type="rqt_robot_monitor" name="rqt_robot_monitor" unless="$(arg sim)" /><!-- Unless value evaluates to false then include tag and its contents,inverse with if -->

<!-- http://wiki.ros.org/tf#static_transform_publisher-->
<!--yaw is rotation about Z, pitch is rotation about Y, and roll is rotation about X frame_id child_frame_id-->
<!-- Run a static transform between /base_link and /base_footprint needed for SLAM -->
<node pkg="tf" type="static_transform_publisher" name="wheel_link_fl2base_link" args="0.228 0.158 -0.034 0 0 0 /base_link /wheel_link_fl 100" />
<node pkg="tf" type="static_transform_publisher" name="wheel_link_fr2base_link" args="0.228 -0.158 -0.034 0 0 0 /base_link /wheel_link_fr 100" />
<node pkg="tf" type="static_transform_publisher" name="wheel_link_bl2base_link" args="-0.228 0.158 -0.034 0 0 0 /base_link /wheel_link_bl 100" />
<node pkg="tf" type="static_transform_publisher" name="wheel_link_br2base_link" args="-0.228 -0.158 -0.034 0 0 0 /base_link /wheel_link_br 100" />

<node pkg="tf" type="static_transform_publisher" name="caster_link_fl2base_link" args="0.228 0.158 -0.034 0 0 0 /base_link /caster_link_fl 100" />
<node pkg="tf" type="static_transform_publisher" name="caster_link_fr2base_link" args="0.228 -0.158 -0.034 0 0 0 /base_link /caster_link_fr 100" />
<node pkg="tf" type="static_transform_publisher" name="caster_link_bl2base_link" args="-0.228 0.158 -0.034 0 0 0 /base_link /caster_link_bl 100" />
<node pkg="tf" type="static_transform_publisher" name="caster_link_bf2base_link" args="-0.228 -0.158 -0.034 0 0 0 /base_link /caster_link_br 100" />

</launch>
blog_20160515_2_8493115 36行 Python
Raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
port: /dev/ttyUSB0
baud: 115200
rate: 20
sync_write: True
sync_read: True
read_rate: 20
write_rate: 20

joints: {
# wheel_joint_fl: {id: 1, neutral: 512, max_speed: 684, min_angle: 0, max_angle: 360, invert: False},
# wheel_joint_fr: {id: 2, neutral: 512, max_speed: 684, min_angle: 0, max_angle: 360, invert: False},
# wheel_joint_bl: {id: 3, neutral: 512, max_speed: 684, min_angle: 0, max_angle: 360, invert: False},
# wheel_joint_br: {id: 4, neutral: 512, max_speed: 684, min_angle: 0, max_angle: 360, invert: False},
wheel_joint_fl: {id: 1, neutral: 512, max_speed: 684, invert: False},
wheel_joint_fr: {id: 2, neutral: 512, max_speed: 684, invert: False},
wheel_joint_bl: {id: 3, neutral: 512, max_speed: 684, invert: False},
wheel_joint_br: {id: 4, neutral: 512, max_speed: 684, invert: False},
arm_joint_1: {id: 5, neutral: 512, max_speed: 684, min_angle: -169, max_angle: 169, invert: False},
arm_joint_2: {id: 6, neutral: 512, max_speed: 684, min_angle: -65, max_angle: 90, invert: False},
arm_joint_3: {id: 7, neutral: 512, max_speed: 684, min_angle: -151, max_angle: 146, invert: False},
arm_joint_4: {id: 8, neutral: 512, max_speed: 684, min_angle: -102.5, max_angle: 102.5, invert: False},
arm_joint_5: {id: 9, neutral: 512, max_speed: 684, min_angle: -167.5, max_angle: 167.5, invert: False},
gripper_finger_joint_l: {id: 10,neutral: 512, max_speed: 684, invert: False},
gripper_finger_joint_r: {id: 11,neutral: 512, max_speed: 684, invert: False}
}
#http://wiki.ros.org/arbotix_python
controllers: {
# Pololu motors: 1856 cpr = 0.3888105m travel = 4773 ticks per meter (empirical: 4684) WheelRadius_[meter] = 0.0475 EncoderTicksPerRound = 4000
base_controller: {type: diff_controller, base_frame_id: base_link, base_width: 0.38, ticks_meter: 4684, Kp: 50, Kd: 0, Ki: 20, Ko: 50, accel_limit: 1.0 },
arm_controller: {type: follow_controller, joints: [arm_joint_1, arm_joint_2, arm_joint_3, arm_joint_4, arm_joint_5], action_name: arm_1/arm_controller/follow_joint_trajectory}
# rbx2/rbx2_dynamixels/config/arbotix/pi_robot_with_gripper.yaml
# arm_controller: {type: follow_controller, joints: [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], action_name: arm_1/arm_controller/follow_joint_trajectory}
}
blog_20160515_3_5810919 11行 Text
Raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
controller_list:
- name: arm_1/arm_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- arm_joint_1
- arm_joint_2
- arm_joint_3
- arm_joint_4
- arm_joint_5
blog_20160515_4_5952623 10行 Text
Raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
controller_list:
- name: arm_1/arm_controller/position_command
    type: brics_actuator/JointPositions
default: true
joints:
- arm_joint_1
- arm_joint_2
- arm_joint_3
- arm_joint_4
- arm_joint_5
blog_20160515_5_9125969 8行 Text
Raw
 1
 2
 3
 4
 5
 6
 7
 8
<launch>
<arg name="moveit_controller_manager" default="moveit_simple_controller_manager/MoveItSimpleControllerManager"/>
<!-- <arg name="moveit_controller_manager" default="moveit_ros_control_interface/MoveItControllerManager"/>-->
<param name="moveit_controller_manager" value="$(arg moveit_controller_manager)"/>

<rosparam file="$(find moveit_youbot)/config/controllers.yaml"/>

</launch>
blog_20160515_6_4491927 35行 html/xml
Raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
<gazebo reference="hokuyo_link">
<sensor type="gpu_ray" name="head_hokuyo_sensor">
<pose>0 0 0 0 0 0</pose>
<visualize>false</visualize>
<update_rate>40</update_rate>
<ray>
<scan>
<horizontal>
<samples>720</samples>
<resolution>1</resolution>
<min_angle>-1.570796</min_angle>
<max_angle>1.570796</max_angle>
</horizontal>
</scan>
<range>
<min>0.10</min>
<max>30.0</max>
<resolution>0.01</resolution>
</range>
<noise>
<type>gaussian</type>
<!-- Noise parameters based on published spec for Hokuyo laser
achieving "+-30mm" accuracy at range < 10m. A mean of 0.0m and
stddev of 0.01m will put 99.7% of samples within 0.03m of the true
reading. -->
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_gpu_laser.so">
<topicName>/rrbot/laser/scan</topicName>
<frameName>hokuyo_link</frameName>
</plugin>
</sensor>
</gazebo>
blog_20160515_7_7839997 6行 html/xml
Raw
 1
 2
 3
 4
 5
 6
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<robotNamespace>/rrbot</robotNamespace>
<robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
</plugin>
</gazebo>
blog_20160515_8_6901905 15行 Python
Raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
rrbot:
# Publish all joint states -----------------------------------
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
# Position Controllers ---------------------------------------
joint1_position_controller:
type: effort_controllers/JointPositionController
joint: joint1
pid: {p: 100.0, i: 0.01, d: 10.0}
joint2_position_controller:
type: effort_controllers/JointPositionController
joint: joint2
pid: {p: 100.0, i: 0.01, d: 10.0}
blog_20160515_9_4743098 28行 html/xml
Raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
<launch>

<!-- these are the arguments you can pass this launch file, for example paused:=true -->
<arg name="paused" default="false"/>
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>

<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find rrbot_gazebo)/worlds/rrbot.world"/>
<arg name="debug" value="$(arg debug)" />
<arg name="gui" value="$(arg gui)" />
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="headless" value="$(arg headless)"/>
</include>

<!-- Load the URDF into the ROS Parameter Server -->
<param name="robot_description"
command="$(find xacro)/xacro.py '$(find rrbot_description)/urdf/rrbot.xacro'" />

<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -model rrbot -param robot_description"/>

</launch>
blog_20160515_10_5408189 18行 html/xml
Raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
<launch>

<!-- Load joint controller configurations from YAML file to parameter server -->
<rosparam file="$(find rrbot_control)/config/rrbot_control.yaml" command="load"/>

<!-- load the controllers -->
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="/rrbot" args="joint_state_controller
joint1_position_controller
joint2_position_controller"/>

<!-- convert joint states to TF transforms for rviz, etc -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"
respawn="false" output="screen">
<remap from="/joint_states" to="/rrbot/joint_states" />
</node>

</launch>
blog_20160516_6_4381657 10行 html/xml
Raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
<transmission name="tran1">
<type>transmission_interface/SimpleTransmission</type>
<joint name="joint1">
<hardwareInterface>EffortJointInterface</hardwareInterface>
</joint>
<actuator name="motor1">
<hardwareInterface>EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>