Skip to content
Snippets Groups Projects
Commit 3618950d authored by Alexander Bubeck's avatar Alexander Bubeck
Browse files

added launch files and controller configuration for launching separate ur5 arm in gazebo

parent 33fbf29e
Branches
Tags
No related merge requests found
<?xml version="1.0"?>
<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
<gazebo>
<controller:gazebo_ros_controller_manager name="gazebo_ros_controller_manager" plugin="libgazebo_ros_controller_manager.so">
<alwaysOn>true</alwaysOn>
<updateRate>1000.0</updateRate>
<interface:audio name="gazebo_ros_controller_manager_dummy_iface" />
</controller:gazebo_ros_controller_manager>
<controller:gazebo_ros_power_monitor name="gazebo_ros_power_monitor_controller" plugin="libgazebo_ros_power_monitor.so">
<alwaysOn>true</alwaysOn>
<updateRate>1.0</updateRate>
<timeout>5</timeout>
<interface:audio name="power_monitor_dummy_interface" />
<powerStateTopic>power_state</powerStateTopic>
<powerStateRate>10.0</powerStateRate>
<fullChargeCapacity>87.78</fullChargeCapacity>
<dischargeRate>-474</dischargeRate>
<chargeRate>525</chargeRate>
<dischargeVoltage>15.52</dischargeVoltage>
<chargeVoltage>16.41</chargeVoltage>
</controller:gazebo_ros_power_monitor>
</gazebo>
</robot>
......@@ -2,7 +2,10 @@
<robot xmlns:xacro="http://ros.org/wiki/xacro"
name="ur5">
<include filename="$(find ur5_description)/urdf/gazebo.urdf.xacro" />
<include filename="$(find ur5_description)/urdf/model.urdf.xacro" />
<xacro:ur5_robot prefix="" />
</robot>
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
# Set the build type. Options are:
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
# Debug : w/ debug symbols, w/o optimization
# Release : w/o debug symbols, w/ optimization
# RelWithDebInfo : w/ debug symbols, w/ optimization
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)
rosbuild_init()
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()
#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
include $(shell rospack find mk)/cmake.mk
\ No newline at end of file
arm_controller:
type: robot_mechanism_controllers/JointTrajectoryActionController
joints:
- shoulder_pan_joint
- shoulder_lift_joint
- elbow_joint
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
gains:
shoulder_pan_joint:
p: 2000.0
d: 0.0
shoulder_lift_joint:
p: 2000.0
d: 0.0
elbow_joint:
p: 2000.0
d: 0.0
wrist_1_joint:
p: 2020.0
d: 0.0
wrist_2_joint:
p: 2030.0
d: 0.0
wrist_3_joint:
p: 2050.0
d: 0.0
arm_joint_trajectory_action_node:
joints:
- shoulder_pan_joint
- shoulder_lift_joint
- elbow_joint
- wrist_1_joint
- wrist_2_joint
- wrist_3_joint
constraints:
goal_time: 0.6
shoulder_pan_joint:
goal: 0.05
shoulder_lift_joint:
goal: 0.05
elbow_joint:
goal: 0.05
wrist_1_joint:
goal: 0.05
wrist_2_joint:
goal: 0.05
wrist_3_joint:
goal: 0.05
<?xml version="1.0"?>
<launch>
<!-- startup simulated world -->
<include file="$(find cob_gazebo_worlds)/ros/launch/empty-world.launch" />
<!-- send frida urdf to param server -->
<param name="robot_description" command="$(find xacro)/xacro.py '$(find ur5_description)/urdf/robot.urdf.xacro'" />
<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_gazebo_model" pkg="gazebo" type="spawn_model" args="-urdf -param robot_description -model robot -z 0.1 " respawn="false" output="screen" />
<!-- Controller Manager -->
<include file="$(find pr2_controller_manager)/controller_manager.launch" />
<!-- Fake Calibration -->
<node pkg="rostopic" type="rostopic" name="fake_joint_calibration" args="pub /calibrated std_msgs/Bool true" />
<rosparam file="$(find ur5_gazebo)/controller/arm_controller_ur5.yaml" command="load"/>
<node name="arm_controller_spawner" pkg="pr2_controller_manager" type="spawner" args="arm_controller" />
<group ns="arm_controller">
<node name="arm_joint_trajectory_action_node" pkg="joint_trajectory_action" type="joint_trajectory_action" />
</group>
</launch>
<package>
<description brief="ur5_gazebo">
ur5_gazebo
</description>
<author>Alexander Bubeck</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
<url>http://ros.org/wiki/ur5_gazebo</url>
<depend package="ur5_description"/>
</package>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment