|
From: <wa...@us...> - 2009-08-21 01:05:46
|
Revision: 22504
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=22504&view=rev
Author: wattsk
Date: 2009-08-21 01:05:38 +0000 (Fri, 21 Aug 2009)
Log Message:
-----------
Update for an alpha2 caster.
Modified Paths:
--------------
pkg/trunk/sandbox/texas/controllers.xml
pkg/trunk/sandbox/texas/dallas.yaml
pkg/trunk/sandbox/texas/drive.launch
pkg/trunk/sandbox/texas/mainpage.dox
pkg/trunk/sandbox/texas/manifest.xml
pkg/trunk/sandbox/texas/tdrive.py
pkg/trunk/sandbox/texas/texas.launch
Modified: pkg/trunk/sandbox/texas/controllers.xml
===================================================================
--- pkg/trunk/sandbox/texas/controllers.xml 2009-08-21 01:04:22 UTC (rev 22503)
+++ pkg/trunk/sandbox/texas/controllers.xml 2009-08-21 01:05:38 UTC (rev 22504)
@@ -1,8 +1,8 @@
<controllers>
<controller name="caster" type="CasterControllerNode">
- <joints caster="fl_caster_rotation_joint"
- wheel_l="fl_caster_l_wheel_joint"
- wheel_r="fl_caster_r_wheel_joint" />
+ <joints caster="bl_caster_rotation_joint"
+ wheel_l="bl_caster_l_wheel_joint"
+ wheel_r="bl_caster_r_wheel_joint" />
<caster_pid p="5.0" i="0" d="0" iClamp="0" />
<wheel_pid p="4" i="0" d="0" iClamp="0" />
</controller>
Modified: pkg/trunk/sandbox/texas/dallas.yaml
===================================================================
--- pkg/trunk/sandbox/texas/dallas.yaml 2009-08-21 01:04:22 UTC (rev 22503)
+++ pkg/trunk/sandbox/texas/dallas.yaml 2009-08-21 01:05:38 UTC (rev 22504)
@@ -2,12 +2,9 @@
type: DallasController
kp_caster_steer: 10.0
joints:
-# caster: bl_caster_rotation_joint
-# wheel_l: bl_caster_l_wheel_joint
-# wheel_r: bl_caster_r_wheel_joint
- caster: bl_caster_l_wheel_joint
- wheel_l: bl_caster_r_wheel_joint
- wheel_r: bl_caster_rotation_joint
+ caster: bl_caster_rotation_joint
+ wheel_l: bl_caster_l_wheel_joint
+ wheel_r: bl_caster_r_wheel_joint
caster_pid:
p: 3
wheel_pid:
Modified: pkg/trunk/sandbox/texas/drive.launch
===================================================================
--- pkg/trunk/sandbox/texas/drive.launch 2009-08-21 01:04:22 UTC (rev 22503)
+++ pkg/trunk/sandbox/texas/drive.launch 2009-08-21 01:05:38 UTC (rev 22504)
@@ -1,12 +1,11 @@
<launch>
+<rosparam command="load" file="$(find texas)/caster.yaml" />
+<node pkg="mechanism_control" type="spawner.py" args="caster_bl" />
-<node pkg="mechanism_control" type="spawner.py"
- args="$(find texas)/controllers.xml" />
+<node pkg="texas" type="tdrive.py" output="screen" />
-<node pkg="texas" type="tdrive.py" />
-
<node pkg="texas" type="teleop_texas_keyboard" output="screen" >
<param name="max_vel" type="double" value="6.0" />
</node>
-</launch>
\ No newline at end of file
+</launch>
Modified: pkg/trunk/sandbox/texas/mainpage.dox
===================================================================
--- pkg/trunk/sandbox/texas/mainpage.dox 2009-08-21 01:04:22 UTC (rev 22503)
+++ pkg/trunk/sandbox/texas/mainpage.dox 2009-08-21 01:05:38 UTC (rev 22504)
@@ -2,18 +2,19 @@
\mainpage
\htmlinclude manifest.html
-\b texas is ...
+\b texas contains the scripts necessary to launch and drive the DallasBot/SkypeBot.
-<!--
-In addition to providing an overview of your package,
-this is the section where the specification and design/architecture
-should be detailed. While the original specification may be done on the
-wiki, it should be transferred here once your package starts to take shape.
-You can then link to this documentation page from the Wiki.
--->
+\section codeapi Code API
+Launching the DallasBot:
+\verbatim
+roslaunch texas.launch
+\endverbatim
-\section codeapi Code API
+Driving the Dallas Bot:
+\verbatim
+roslaunch drive.launch
+\endverbatim
<!--
Provide links to specific auto-generated API documentation within your
Modified: pkg/trunk/sandbox/texas/manifest.xml
===================================================================
--- pkg/trunk/sandbox/texas/manifest.xml 2009-08-21 01:04:22 UTC (rev 22503)
+++ pkg/trunk/sandbox/texas/manifest.xml 2009-08-21 01:05:38 UTC (rev 22504)
@@ -1,13 +1,14 @@
<package>
<description brief="Brings up and controls Dallas Bot">
</description>
- <author>Dallas, Kevin</author>
+ <author>Dallas Goecker, Kevin Watts</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
<url>http://pr.willowgarage.com/wiki/texas</url>
<depend package="pr2_etherCAT"/>
<depend package="pr2_defs"/>
<depend package="mechanism_msgs" />
+ <depend package="pr2_mechanism_controllers" />
</package>
Modified: pkg/trunk/sandbox/texas/tdrive.py
===================================================================
--- pkg/trunk/sandbox/texas/tdrive.py 2009-08-21 01:04:22 UTC (rev 22503)
+++ pkg/trunk/sandbox/texas/tdrive.py 2009-08-21 01:05:38 UTC (rev 22504)
@@ -27,6 +27,7 @@
# POSSIBILITY OF SUCH DAMAGE.
# Author: Dallas Goecker
+
import time
import random
import roslib
@@ -68,11 +69,13 @@
pub_drive = rospy.Publisher("/caster/drive_velocity", Float64)
pub_steer.publish(Float64(0.0))
pub_drive.publish(Float64(0.0))
- print "Waiting for a mechanism_state message..."
+ print "tdrive.py: Waiting for robot JointStates publication..."
while not last_state.msg and not rospy.is_shutdown(): pass
+ print "tdrive.py: Waiting for TexasCmd publication..."
while not tx_cmd.msg and not rospy.is_shutdown(): pass
+ print "tdrive.py: looping..."
while not rospy.is_shutdown():
- time.sleep(0.01)
+ time.sleep(0.10)
# Get angle, velocity from command
drive_cmd = tx_cmd.last()
Modified: pkg/trunk/sandbox/texas/texas.launch
===================================================================
--- pkg/trunk/sandbox/texas/texas.launch 2009-08-21 01:04:22 UTC (rev 22503)
+++ pkg/trunk/sandbox/texas/texas.launch 2009-08-21 01:05:38 UTC (rev 22504)
@@ -1,7 +1,9 @@
<launch>
<machine name="realtime_root" user="root" address="texas" ros-root="$(env ROS_ROOT)" ros-package-path="$(env ROS_PACKAGE_PATH)" default="never"/>
- <machine name="realtime" address="texas" ros-root="$(env ROS_ROOT)" ros-package-path="$(env ROS_PACKAGE_PATH)" default="true"/>
+ <machine name="realtime" address="texas" ros-root="$(env ROS_ROOT)" ros-package-path="$(env ROS_PACKAGE_PATH)" default="true">
+ <env name="PATH" value="$(env PATH):$(env ROS_ROOT)/bin" /> <!-- HACK. Depends on ROS bug #1586. Remove when closed -->
+ </machine>
<!-- Uses special defs file for Alpha 2.0 hardware on PRE -->
<param name="robot_description" command="$(find xacro)/xacro.py '$(find texas)/texas.xml'" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2009-08-21 06:45:44
|
Revision: 22540
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=22540&view=rev
Author: wattsk
Date: 2009-08-21 06:45:36 +0000 (Fri, 21 Aug 2009)
Log Message:
-----------
Uses Aplha2. Calibrates Correctly. Used Eric?\194?\180s help. Does not communicate CasterController.
Modified Paths:
--------------
pkg/trunk/sandbox/texas/tdrive.py
pkg/trunk/sandbox/texas/texas.launch
pkg/trunk/sandbox/texas/texas.xml
Modified: pkg/trunk/sandbox/texas/tdrive.py
===================================================================
--- pkg/trunk/sandbox/texas/tdrive.py 2009-08-21 06:19:55 UTC (rev 22539)
+++ pkg/trunk/sandbox/texas/tdrive.py 2009-08-21 06:45:36 UTC (rev 22540)
@@ -65,7 +65,7 @@
last_state = LastMessage('/joint_states', JointStates)
tx_cmd = LastMessage('texas_cmd', TexasCmd)
- pub_steer = rospy.Publisher("/caster/steer_velocity", Float64)
+ pub_steer = rospy.Publisher("/caster_bl/caster/set_command", Float64)
pub_drive = rospy.Publisher("/caster/drive_velocity", Float64)
pub_steer.publish(Float64(0.0))
pub_drive.publish(Float64(0.0))
Modified: pkg/trunk/sandbox/texas/texas.launch
===================================================================
--- pkg/trunk/sandbox/texas/texas.launch 2009-08-21 06:19:55 UTC (rev 22539)
+++ pkg/trunk/sandbox/texas/texas.launch 2009-08-21 06:45:36 UTC (rev 22540)
@@ -1,20 +1,21 @@
<launch>
<machine name="realtime_root" user="root" address="texas" ros-root="$(env ROS_ROOT)" ros-package-path="$(env ROS_PACKAGE_PATH)" default="never"/>
- <machine name="realtime" address="texas" ros-root="$(env ROS_ROOT)" ros-package-path="$(env ROS_PACKAGE_PATH)" default="true">
- <env name="PATH" value="$(env PATH):$(env ROS_ROOT)/bin" /> <!-- HACK. Depends on ROS bug #1586. Remove when closed -->
- </machine>
+ <machine name="realtime" address="texas" ros-root="$(env ROS_ROOT)" ros-package-path="$(env ROS_PACKAGE_PATH)" default="true"/>
<!-- Uses special defs file for Alpha 2.0 hardware on PRE -->
- <param name="robot_description" command="$(find xacro)/xacro.py '$(find texas)/texas.xml'" />
- <param name="robot_description_new" command="$(find xacro)/xacro.py '$(find texas)/texas.urdf.xacro'" />
+ <param name="robotdesc/pr2" command="$(find xacro)/xacro.py '$(find texas)/texas.xml'" />
+ <!-- Definitions for calibration controllers -->
+ <rosparam command="load" file="$(find pr2_default_controllers)/pr2_calibration_controllers.yaml" />
+ <node pkg="mechanism_bringup" type="calibrate.py" args="cal_caster_bl_alpha2"/>
+
<!-- pr2_etherCAT -->
- <node machine="realtime_root" pkg="pr2_etherCAT" type="pr2_etherCAT" args="-i eth0 -x /robotdesc/pr2"/>
+ <node machine="realtime_root" pkg="pr2_etherCAT" type="pr2_etherCAT" args="-i eth0 -x /robotdesc/pr2" output="screen"/>
<!-- Runtime Diagnostics Logging -->
- <node pkg="rosrecord" type="rosrecord" args="-f /hwlog/texas /diagnostics" />
+ <node pkg="rosrecord" type="rosrecord" args="-f /hwlog/pre_runtime_automatic /diagnostics" />
</launch>
Modified: pkg/trunk/sandbox/texas/texas.xml
===================================================================
--- pkg/trunk/sandbox/texas/texas.xml 2009-08-21 06:19:55 UTC (rev 22539)
+++ pkg/trunk/sandbox/texas/texas.xml 2009-08-21 06:45:36 UTC (rev 22540)
@@ -1,10 +1,10 @@
<robot name="texas">
<include filename="$(find pr2_defs)/calibration/default_cal.xml" />
- <include filename="$(find pr2_defs)/defs/base_defs.xml" />
+ <include filename="$(find pr2_defs)/defs/alpha2_base_defs.xml" />
-<pr2_caster suffix="bl" parent="base_link">
+<pr2_caster_alpha2 suffix="bl" parent="base_link" ref_position="0">
<origin xyz="0 0 0" rpy="0 0 0" />
-</pr2_caster>
+</pr2_caster_alpha2>
<!-- Solid Base for visualizer -->
<joint name="base_joint" type="planar" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2009-08-22 00:22:25
|
Revision: 22624
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=22624&view=rev
Author: wattsk
Date: 2009-08-21 23:43:18 +0000 (Fri, 21 Aug 2009)
Log Message:
-----------
Dallas-bot drives!!
Modified Paths:
--------------
pkg/trunk/sandbox/texas/dallas.yaml
pkg/trunk/sandbox/texas/drive.launch
pkg/trunk/sandbox/texas/texas.xml
Modified: pkg/trunk/sandbox/texas/dallas.yaml
===================================================================
--- pkg/trunk/sandbox/texas/dallas.yaml 2009-08-21 23:37:56 UTC (rev 22623)
+++ pkg/trunk/sandbox/texas/dallas.yaml 2009-08-21 23:43:18 UTC (rev 22624)
@@ -8,6 +8,6 @@
caster_pid:
p: 3
wheel_pid:
- p: 5
+ p: 2
Modified: pkg/trunk/sandbox/texas/drive.launch
===================================================================
--- pkg/trunk/sandbox/texas/drive.launch 2009-08-21 23:37:56 UTC (rev 22623)
+++ pkg/trunk/sandbox/texas/drive.launch 2009-08-21 23:43:18 UTC (rev 22624)
@@ -1,4 +1,17 @@
<launch>
+
+ <rosparam command="load" file="$(find texas)/dallas.yaml" />
+ <node pkg="mechanism_control" type="spawner.py" args="dallas_controller" />
+
+ <param name="walk_vel" value="0.20" />
+ <param name="run_vel" value="0.5" />
+ <param name="yaw_rate" value="0.3" />
+ <param name="yaw_run_rate" value="1.5" />
+ <node pkg="teleop_pr2" type="teleop_pr2_keyboard" output="screen">
+ <remap from="cmd_vel" to="/dallas_controller/cmd_vel" />
+ </node>
+
+ <!--
<rosparam command="load" file="$(find texas)/caster.yaml" />
<node pkg="mechanism_control" type="spawner.py" args="caster_bl" />
@@ -7,5 +20,6 @@
<node pkg="texas" type="teleop_texas_keyboard" output="screen" >
<param name="max_vel" type="double" value="6.0" />
</node>
+-->
</launch>
Modified: pkg/trunk/sandbox/texas/texas.xml
===================================================================
--- pkg/trunk/sandbox/texas/texas.xml 2009-08-21 23:37:56 UTC (rev 22623)
+++ pkg/trunk/sandbox/texas/texas.xml 2009-08-21 23:43:18 UTC (rev 22624)
@@ -2,7 +2,7 @@
<include filename="$(find pr2_defs)/calibration/default_cal.xml" />
<include filename="$(find pr2_defs)/defs/alpha2_base_defs.xml" />
-<pr2_caster_alpha2 suffix="bl" parent="base_link" ref_position="0">
+<pr2_caster_alpha2 suffix="bl" parent="base_link" ref_position="-0.785">
<origin xyz="0 0 0" rpy="0 0 0" />
</pr2_caster_alpha2>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2009-08-27 03:05:41
|
Revision: 23099
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=23099&view=rev
Author: wattsk
Date: 2009-08-27 03:05:34 +0000 (Thu, 27 Aug 2009)
Log Message:
-----------
running the dallas bot with the same base controller as the pr2 with just a new urdf :-)
Modified Paths:
--------------
pkg/trunk/sandbox/texas/drive.launch
pkg/trunk/sandbox/texas/texas.launch
pkg/trunk/sandbox/texas/texas.xml
Added Paths:
-----------
pkg/trunk/sandbox/texas/dallas_base_controller.yaml
pkg/trunk/sandbox/texas/drive_base.launch
Added: pkg/trunk/sandbox/texas/dallas_base_controller.yaml
===================================================================
--- pkg/trunk/sandbox/texas/dallas_base_controller.yaml (rev 0)
+++ pkg/trunk/sandbox/texas/dallas_base_controller.yaml 2009-08-27 03:05:34 UTC (rev 23099)
@@ -0,0 +1,46 @@
+caster_names: bl_caster_rotation_link
+
+type: Pr2BaseController
+
+caster_pid_gains: &caster_pid_gains
+ p: 3.0
+ d: 0.0
+ i: 0.1
+ i_clamp: 4.0
+wheel_pid_gains: &wheel_pid_gains
+ p: 2.0
+ d: 0.0
+ i: 0.01
+ i_clamp: 0.4
+
+bl_caster_l_wheel_joint:
+ *wheel_pid_gains
+bl_caster_r_wheel_joint:
+ *wheel_pid_gains
+
+bl_caster_rotation_joint:
+ *caster_pid_gains
+
+caster_speed_threshold: 0.2
+caster_position_error_threshold: 0.05
+wheel_speed_threshold: 0.2
+caster_effort_threshold: 3.45
+wheel_effort_threshold: 3.45
+kp_wheel_steer: 2.0
+alpha_stall: 0.5
+kp_caster_steer: 40.0
+timeout: 0.4
+max_accel:
+ ax: 0.5
+ ay: 2.0
+ alphaz: 2.0
+
+state_publish_time: 0.25
+
+max_vel:
+ vx: 1.0
+ vy: 1.0
+ omegaz: 2.0
+
+cmd_topic:
+ /cmd_vel
\ No newline at end of file
Modified: pkg/trunk/sandbox/texas/drive.launch
===================================================================
--- pkg/trunk/sandbox/texas/drive.launch 2009-08-27 03:02:49 UTC (rev 23098)
+++ pkg/trunk/sandbox/texas/drive.launch 2009-08-27 03:05:34 UTC (rev 23099)
@@ -3,23 +3,13 @@
<rosparam command="load" file="$(find texas)/dallas.yaml" />
<node pkg="mechanism_control" type="spawner.py" args="dallas_controller" />
- <param name="walk_vel" value="0.20" />
- <param name="run_vel" value="0.5" />
- <param name="yaw_rate" value="0.3" />
- <param name="yaw_run_rate" value="1.5" />
+ <!-- Swapping walk and run. Run (Caps) is now super slow -->
+ <param name="walk_vel" value="0.4" />
+ <param name="run_vel" value="0.1" />
+ <param name="yaw_rate" value="0.5" />
+ <param name="yaw_run_rate" value="0.2" />
<node pkg="teleop_pr2" type="teleop_pr2_keyboard" output="screen">
<remap from="cmd_vel" to="/dallas_controller/cmd_vel" />
</node>
- <!--
-<rosparam command="load" file="$(find texas)/caster.yaml" />
-<node pkg="mechanism_control" type="spawner.py" args="caster_bl" />
-
-<node pkg="texas" type="tdrive.py" output="screen" />
-
-<node pkg="texas" type="teleop_texas_keyboard" output="screen" >
- <param name="max_vel" type="double" value="6.0" />
-</node>
--->
-
</launch>
Added: pkg/trunk/sandbox/texas/drive_base.launch
===================================================================
--- pkg/trunk/sandbox/texas/drive_base.launch (rev 0)
+++ pkg/trunk/sandbox/texas/drive_base.launch 2009-08-27 03:05:34 UTC (rev 23099)
@@ -0,0 +1,14 @@
+<launch>
+
+ <rosparam command="load" file="$(find texas)/dallas_base_controller.yaml" ns="pr2_base_controller"/>
+ <node pkg="mechanism_control" type="spawner.py" args="pr2_base_controller" />
+
+ <!-- Swapping walk and run. Run (Caps) is now super slow -->
+ <param name="walk_vel" value="0.4" />
+ <param name="run_vel" value="0.1" />
+ <param name="yaw_rate" value="0.5" />
+ <param name="yaw_run_rate" value="0.2" />
+ <node pkg="teleop_pr2" type="teleop_pr2_keyboard" output="screen">
+ </node>
+
+</launch>
Modified: pkg/trunk/sandbox/texas/texas.launch
===================================================================
--- pkg/trunk/sandbox/texas/texas.launch 2009-08-27 03:02:49 UTC (rev 23098)
+++ pkg/trunk/sandbox/texas/texas.launch 2009-08-27 03:05:34 UTC (rev 23099)
@@ -8,7 +8,7 @@
<!-- Definitions for calibration controllers -->
<rosparam command="load" file="$(find pr2_default_controllers)/pr2_calibration_controllers.yaml" />
- <node pkg="mechanism_bringup" type="calibrate.py" args="cal_caster_bl_alpha2"/>
+ <node pkg="mechanism_bringup" type="calibrate.py" args="cal_caster_bl"/>
<!-- pr2_etherCAT -->
<node machine="realtime_root" pkg="pr2_etherCAT" type="pr2_etherCAT" args="-i eth0 -x /robotdesc/pr2" output="screen"/>
Modified: pkg/trunk/sandbox/texas/texas.xml
===================================================================
--- pkg/trunk/sandbox/texas/texas.xml 2009-08-27 03:02:49 UTC (rev 23098)
+++ pkg/trunk/sandbox/texas/texas.xml 2009-08-27 03:05:34 UTC (rev 23099)
@@ -1,10 +1,10 @@
<robot name="texas">
<include filename="$(find pr2_defs)/calibration/default_cal.xml" />
- <include filename="$(find pr2_defs)/defs/alpha2_base_defs.xml" />
+ <include filename="$(find pr2_defs)/defs/base_defs.xml" />
-<pr2_caster_alpha2 suffix="bl" parent="base_link" ref_position="-0.785">
- <origin xyz="0 0 0" rpy="0 0 0" />
-</pr2_caster_alpha2>
+<pr2_caster suffix="bl" parent="base_link" ref_position="-0.785" >
+ <origin xyz="-0.43 0 0" rpy="0 0 0" />
+</pr2_caster>
<!-- Solid Base for visualizer -->
<joint name="base_joint" type="planar" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2009-09-01 03:01:02
|
Revision: 23460
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=23460&view=rev
Author: wattsk
Date: 2009-09-01 03:00:53 +0000 (Tue, 01 Sep 2009)
Log Message:
-----------
Use texas.launch, ps3_drive.launch, /joy/joy
Modified Paths:
--------------
pkg/trunk/sandbox/texas/dallas_base_controller.yaml
pkg/trunk/sandbox/texas/texas.launch
Added Paths:
-----------
pkg/trunk/sandbox/texas/ps3_drive.launch
Modified: pkg/trunk/sandbox/texas/dallas_base_controller.yaml
===================================================================
--- pkg/trunk/sandbox/texas/dallas_base_controller.yaml 2009-09-01 02:57:08 UTC (rev 23459)
+++ pkg/trunk/sandbox/texas/dallas_base_controller.yaml 2009-09-01 03:00:53 UTC (rev 23460)
@@ -31,7 +31,7 @@
kp_caster_steer: 40.0
timeout: 0.4
max_accel:
- ax: 0.5
+ ax: 1.0
ay: 2.0
alphaz: 2.0
@@ -43,4 +43,4 @@
omegaz: 2.0
cmd_topic:
- /cmd_vel
\ No newline at end of file
+ /cmd_vel
Added: pkg/trunk/sandbox/texas/ps3_drive.launch
===================================================================
--- pkg/trunk/sandbox/texas/ps3_drive.launch (rev 0)
+++ pkg/trunk/sandbox/texas/ps3_drive.launch 2009-09-01 03:00:53 UTC (rev 23460)
@@ -0,0 +1,46 @@
+<launch>
+
+ <rosparam command="load" file="$(find texas)/dallas_base_controller.yaml" ns="pr2_base_controller" />
+ <node pkg="mechanism_control" type="spawner.py" args="pr2_base_controller" />
+
+
+ <group name="ps3_teleop">
+ <!-- Axes -->
+ <param name="axis_vx" value="3" type="int"/>
+ <param name="axis_vy" value="-1" type="int"/>
+ <param name="axis_vw" value="2" type="int"/>
+ <param name="axis_pan" value="0" type="int"/>
+ <param name="axis_tilt" value="3" type="int"/>
+
+ <!-- Base velocities -->
+ <param name="max_vw" value="0.8" />
+ <param name="max_vx" value="0.5" />
+ <param name="max_vy" value="0.5" />
+ <param name="max_vw_run" value="1.4" />
+ <param name="max_vx_run" value="1.0" />
+ <param name="max_vy_run" value="1.0" />
+
+ <!-- Head -->
+ <param name="max_pan" value="2.7" />
+ <param name="max_tilt" value="1.4" />
+ <param name="min_tilt" value="-0.4" />
+ <param name="tilt_step" value="0.015" />
+ <param name="pan_step" value="0.02" />
+
+ <!-- Buttons have changed for PS3 controller mapping -->
+ <param name="run_button" value="11" type="int" />
+ <param name="torso_dn_button" value="14" type="int" />
+ <param name="torso_up_button" value="12" type="int" />
+ <param name="head_button" value="8" type="int" />
+ <param name="deadman_button" value="10" type="int"/>
+
+ <param name="walk_vel" value="0.20" />
+ <param name="run_vel" value="0.5" />
+ <param name="yaw_rate" value="0.3" />
+ <param name="yaw_run_rate" value="1.5" />
+ <node pkg="teleop_pr2" type="teleop_pr2" output="screen">
+ </node>
+
+ </group>
+</launch>
+
Modified: pkg/trunk/sandbox/texas/texas.launch
===================================================================
--- pkg/trunk/sandbox/texas/texas.launch 2009-09-01 02:57:08 UTC (rev 23459)
+++ pkg/trunk/sandbox/texas/texas.launch 2009-09-01 03:00:53 UTC (rev 23460)
@@ -13,8 +13,6 @@
<!-- pr2_etherCAT -->
<node machine="realtime_root" pkg="pr2_etherCAT" type="pr2_etherCAT" args="-i eth0 -x /robotdesc/pr2" output="screen"/>
- <node pkg="pr2_mechanism_control" type="spawner.py" args="pr2_base_controller" />
-
<!-- Runtime Diagnostics Logging -->
<node pkg="rosrecord" type="rosrecord" args="-f /hwlog/pre_runtime_automatic /diagnostics" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2009-09-01 21:16:52
|
Revision: 23601
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=23601&view=rev
Author: wattsk
Date: 2009-09-01 21:16:43 +0000 (Tue, 01 Sep 2009)
Log Message:
-----------
Fixed dallas bot launch file to calibrate
Modified Paths:
--------------
pkg/trunk/sandbox/texas/manifest.xml
pkg/trunk/sandbox/texas/texas.launch
pkg/trunk/sandbox/texas/texas.urdf.xacro
Removed Paths:
-------------
pkg/trunk/sandbox/texas/texas.xml
Modified: pkg/trunk/sandbox/texas/manifest.xml
===================================================================
--- pkg/trunk/sandbox/texas/manifest.xml 2009-09-01 21:09:41 UTC (rev 23600)
+++ pkg/trunk/sandbox/texas/manifest.xml 2009-09-01 21:16:43 UTC (rev 23601)
@@ -9,6 +9,7 @@
<depend package="pr2_defs"/>
<depend package="pr2_mechanism_msgs" />
<depend package="pr2_mechanism_controllers" />
+ <depend package="mechanism_bringup" />
</package>
Modified: pkg/trunk/sandbox/texas/texas.launch
===================================================================
--- pkg/trunk/sandbox/texas/texas.launch 2009-09-01 21:09:41 UTC (rev 23600)
+++ pkg/trunk/sandbox/texas/texas.launch 2009-09-01 21:16:43 UTC (rev 23601)
@@ -1,20 +1,17 @@
<launch>
-
<machine name="realtime_root" user="root" address="texas" ros-root="$(env ROS_ROOT)" ros-package-path="$(env ROS_PACKAGE_PATH)" default="never"/>
<machine name="realtime" address="texas" ros-root="$(env ROS_ROOT)" ros-package-path="$(env ROS_PACKAGE_PATH)" default="true"/>
- <!-- Uses special defs file for Alpha 2.0 hardware on PRE -->
- <param name="robotdesc/pr2" command="$(find xacro)/xacro.py '$(find texas)/texas.xml'" />
-
<!-- Definitions for calibration controllers -->
<rosparam command="load" file="$(find pr2_default_controllers)/pr2_calibration_controllers.yaml" />
<node pkg="mechanism_bringup" type="calibrate.py" args="cal_caster_bl"/>
-<!-- pr2_etherCAT -->
- <node machine="realtime_root" pkg="pr2_etherCAT" type="pr2_etherCAT" args="-i eth0 -x /robotdesc/pr2" output="screen"/>
+ <!-- Uses special defs file for DallasBot -->
+ <param name="robotdesc/pr2" command="$(find xacro)/xacro.py '$(find texas)/texas.urdf.xacro'" />
+ <!-- pr2_etherCAT -->
+ <node machine="realtime_root" pkg="pr2_etherCAT" type="pr2_etherCAT" args="-i eth0 -x robotdesc/pr2" output="screen"/>
-<!-- Runtime Diagnostics Logging -->
+ <!-- Runtime Diagnostics Logging -->
<node pkg="rosrecord" type="rosrecord" args="-f /hwlog/pre_runtime_automatic /diagnostics" />
-
</launch>
Modified: pkg/trunk/sandbox/texas/texas.urdf.xacro
===================================================================
--- pkg/trunk/sandbox/texas/texas.urdf.xacro 2009-09-01 21:09:41 UTC (rev 23600)
+++ pkg/trunk/sandbox/texas/texas.urdf.xacro 2009-09-01 21:16:43 UTC (rev 23601)
@@ -3,9 +3,9 @@
<include filename="$(find pr2_defs)/defs/base/base_defs.urdf.xacro" />
<include filename="$(find pr2_defs)/defs/materials.urdf.xacro" />
-<pr2_caster suffix="bl" parent="base_link">
- <origin xyz="0 0 0" rpy="0 0 0" />
-</pr2_caster>
+ <pr2_caster suffix="bl" parent="base_link" ref_position="-0.785">
+ <origin xyz="0 0 0" rpy="0 0 0" />
+ </pr2_caster>
<!-- Solid Base for visualizer -->
<joint name="base_joint" type="planar">
Deleted: pkg/trunk/sandbox/texas/texas.xml
===================================================================
--- pkg/trunk/sandbox/texas/texas.xml 2009-09-01 21:09:41 UTC (rev 23600)
+++ pkg/trunk/sandbox/texas/texas.xml 2009-09-01 21:16:43 UTC (rev 23601)
@@ -1,40 +0,0 @@
-<robot name="texas">
- <include filename="$(find pr2_defs)/calibration/default_cal.xml" />
- <include filename="$(find pr2_defs)/defs/base_defs.xml" />
-
-<pr2_caster suffix="bl" parent="base_link" ref_position="-0.785" >
- <origin xyz="-0.43 0 0" rpy="0 0 0" />
-</pr2_caster>
-
- <!-- Solid Base for visualizer -->
- <joint name="base_joint" type="planar" />
-
- <link name="base_link">
- <parent name=" world" />
- <origin xyz=" 0 0 1 " rpy=" 0 0 0" />
- <joint name="base_joint" />
- <inertial>
- <mass value="100" />
- <com xyz=" 0 0 0 " />
- <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100" />
- </inertial>
- <visual>
- <origin xyz="0 0 -1" rpy="0 0 0 " />
- <map name="gazebo_material" flag="gazebo">
- <elem key="material">Gazebo/White</elem>
- </map>
- <geometry name="pr2_base_mesh_file">
- <mesh scale="20 20 0.01" />
- </geometry>
- </visual>
- <collision>
- <origin xyz="0 0 -1" rpy="0.0 0.0 0.0 " />
- <geometry name="base_collision_geom">
- <box size="20 20 0.01" />
- </geometry>
- </collision>
- </link>
-
-
-</robot>
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wg_...@us...> - 2009-09-02 03:32:19
|
Revision: 23664
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=23664&view=rev
Author: wg_cmeyers
Date: 2009-09-02 03:32:12 +0000 (Wed, 02 Sep 2009)
Log Message:
-----------
Fixed for latest p[ackage updates. Uses Alpha2 caster. Does not turn.
Modified Paths:
--------------
pkg/trunk/sandbox/texas/manifest.xml
pkg/trunk/sandbox/texas/ps3_drive.launch
pkg/trunk/sandbox/texas/texas.launch
pkg/trunk/sandbox/texas/texas.urdf.xacro
Modified: pkg/trunk/sandbox/texas/manifest.xml
===================================================================
--- pkg/trunk/sandbox/texas/manifest.xml 2009-09-02 03:30:19 UTC (rev 23663)
+++ pkg/trunk/sandbox/texas/manifest.xml 2009-09-02 03:32:12 UTC (rev 23664)
@@ -10,6 +10,7 @@
<depend package="pr2_mechanism_msgs" />
<depend package="pr2_mechanism_controllers" />
<depend package="mechanism_bringup" />
+ <depend package="teleop_pr2" />
</package>
Modified: pkg/trunk/sandbox/texas/ps3_drive.launch
===================================================================
--- pkg/trunk/sandbox/texas/ps3_drive.launch 2009-09-02 03:30:19 UTC (rev 23663)
+++ pkg/trunk/sandbox/texas/ps3_drive.launch 2009-09-02 03:32:12 UTC (rev 23664)
@@ -1,8 +1,6 @@
<launch>
-
- <rosparam command="load" file="$(find texas)/dallas_base_controller.yaml" ns="pr2_base_controller" />
- <node pkg="mechanism_control" type="spawner.py" args="pr2_base_controller" />
-
+ <rosparam command="load" file="$(find texas)/dallas_base_controller.yaml" ns="pr2_base_controller" />
+ <node pkg="pr2_mechanism_control" type="spawner.py" args="pr2_base_controller" />
<group name="ps3_teleop">
<!-- Axes -->
Modified: pkg/trunk/sandbox/texas/texas.launch
===================================================================
--- pkg/trunk/sandbox/texas/texas.launch 2009-09-02 03:30:19 UTC (rev 23663)
+++ pkg/trunk/sandbox/texas/texas.launch 2009-09-02 03:32:12 UTC (rev 23664)
@@ -4,7 +4,7 @@
<!-- Definitions for calibration controllers -->
<rosparam command="load" file="$(find pr2_default_controllers)/pr2_calibration_controllers.yaml" />
- <node pkg="mechanism_bringup" type="calibrate.py" args="cal_caster_bl"/>
+ <node pkg="mechanism_bringup" type="calibrate.py" args="cal_caster_bl_alpha2"/>
<!-- Uses special defs file for DallasBot -->
<param name="robotdesc/pr2" command="$(find xacro)/xacro.py '$(find texas)/texas.urdf.xacro'" />
Modified: pkg/trunk/sandbox/texas/texas.urdf.xacro
===================================================================
--- pkg/trunk/sandbox/texas/texas.urdf.xacro 2009-09-02 03:30:19 UTC (rev 23663)
+++ pkg/trunk/sandbox/texas/texas.urdf.xacro 2009-09-02 03:32:12 UTC (rev 23664)
@@ -1,11 +1,11 @@
<robot name="texas">
<include filename="$(find pr2_defs)/calibration/default_cal.xml" />
- <include filename="$(find pr2_defs)/defs/base/base_defs.urdf.xacro" />
+ <include filename="$(find pr2_defs)/defs/base/alpha2_base_defs.urdf.xacro" />
<include filename="$(find pr2_defs)/defs/materials.urdf.xacro" />
- <pr2_caster suffix="bl" parent="base_link" ref_position="-0.785">
+ <pr2_caster_alpha2 suffix="bl" parent="base_link" ref_position="-0.785">
<origin xyz="0 0 0" rpy="0 0 0" />
- </pr2_caster>
+ </pr2_caster_alpha2>
<!-- Solid Base for visualizer -->
<joint name="base_joint" type="planar">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wg_...@us...> - 2009-09-02 03:50:41
|
Revision: 23669
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=23669&view=rev
Author: wg_cmeyers
Date: 2009-09-02 03:50:32 +0000 (Wed, 02 Sep 2009)
Log Message:
-----------
Deleted old files
Added Paths:
-----------
pkg/trunk/sandbox/texas/texas.yaml
Removed Paths:
-------------
pkg/trunk/sandbox/texas/dallas.yaml
pkg/trunk/sandbox/texas/dallas_base_controller.yaml
pkg/trunk/sandbox/texas/drive_base.launch
pkg/trunk/sandbox/texas/drive_base_joy.launch
pkg/trunk/sandbox/texas/msg/TexasCmd.msg
pkg/trunk/sandbox/texas/tdrive.py
pkg/trunk/sandbox/texas/teleop_texas_keyboard.cpp
Deleted: pkg/trunk/sandbox/texas/dallas.yaml
===================================================================
--- pkg/trunk/sandbox/texas/dallas.yaml 2009-09-02 03:47:56 UTC (rev 23668)
+++ pkg/trunk/sandbox/texas/dallas.yaml 2009-09-02 03:50:32 UTC (rev 23669)
@@ -1,13 +0,0 @@
-dallas_controller:
- type: DallasController
- kp_caster_steer: 10.0
- joints:
- caster: bl_caster_rotation_joint
- wheel_l: bl_caster_l_wheel_joint
- wheel_r: bl_caster_r_wheel_joint
- caster_pid:
- p: 3
- wheel_pid:
- p: 2
-
-
Deleted: pkg/trunk/sandbox/texas/dallas_base_controller.yaml
===================================================================
--- pkg/trunk/sandbox/texas/dallas_base_controller.yaml 2009-09-02 03:47:56 UTC (rev 23668)
+++ pkg/trunk/sandbox/texas/dallas_base_controller.yaml 2009-09-02 03:50:32 UTC (rev 23669)
@@ -1,46 +0,0 @@
-caster_names: bl_caster_rotation_link
-
-type: Pr2BaseController
-
-caster_pid_gains: &caster_pid_gains
- p: 3.0
- d: 0.0
- i: 0.1
- i_clamp: 4.0
-wheel_pid_gains: &wheel_pid_gains
- p: 2.0
- d: 0.0
- i: 0.01
- i_clamp: 0.4
-
-bl_caster_l_wheel_joint:
- *wheel_pid_gains
-bl_caster_r_wheel_joint:
- *wheel_pid_gains
-
-bl_caster_rotation_joint:
- *caster_pid_gains
-
-caster_speed_threshold: 0.2
-caster_position_error_threshold: 0.05
-wheel_speed_threshold: 0.2
-caster_effort_threshold: 3.45
-wheel_effort_threshold: 3.45
-kp_wheel_steer: 2.0
-alpha_stall: 0.5
-kp_caster_steer: 40.0
-timeout: 0.4
-max_accel:
- ax: 1.0
- ay: 2.0
- alphaz: 2.0
-
-state_publish_time: 0.25
-
-max_vel:
- vx: 1.0
- vy: 1.0
- omegaz: 2.0
-
-cmd_topic:
- /cmd_vel
Deleted: pkg/trunk/sandbox/texas/drive_base.launch
===================================================================
--- pkg/trunk/sandbox/texas/drive_base.launch 2009-09-02 03:47:56 UTC (rev 23668)
+++ pkg/trunk/sandbox/texas/drive_base.launch 2009-09-02 03:50:32 UTC (rev 23669)
@@ -1,14 +0,0 @@
-<launch>
-
- <rosparam command="load" file="$(find texas)/dallas_base_controller.yaml" ns="pr2_base_controller"/>
- <node pkg="pr2_mechanism_control" type="spawner.py" args="pr2_base_controller" />
-
- <!-- Swapping walk and run. Run (Caps) is now super slow -->
- <param name="walk_vel" value="0.4" />
- <param name="run_vel" value="0.1" />
- <param name="yaw_rate" value="0.5" />
- <param name="yaw_run_rate" value="0.2" />
- <node pkg="teleop_pr2" type="teleop_pr2_keyboard" output="screen">
- </node>
-
-</launch>
Deleted: pkg/trunk/sandbox/texas/drive_base_joy.launch
===================================================================
--- pkg/trunk/sandbox/texas/drive_base_joy.launch 2009-09-02 03:47:56 UTC (rev 23668)
+++ pkg/trunk/sandbox/texas/drive_base_joy.launch 2009-09-02 03:50:32 UTC (rev 23669)
@@ -1,40 +0,0 @@
-<launch>
-
- <rosparam command="load" file="$(find texas)/dallas_base_controller.yaml" ns="pr2_base_controller"/>
- <node pkg="pr2_mechanism_control" type="spawner.py" args="pr2_base_controller" />
-
- <group name="joystick_teleop">
- <!-- Axes -->
- <param name="axis_vx" value="3" type="int"/>
- <param name="axis_vy" value="-1" type="int"/>
- <param name="axis_vw" value="2" type="int"/>
- <param name="axis_pan" value="0" type="int"/>
- <param name="axis_tilt" value="3" type="int"/>
-
- <!-- Base velocities -->
- <param name="max_vw" value="1.0" />
- <param name="max_vx" value="0.5" />
- <param name="max_vy" value="0.5" />
- <param name="max_vw_run" value="2.0" />
- <param name="max_vx_run" value="2.0" />
- <param name="max_vy_run" value="2.0" />
-
- <!-- Head -->
- <param name="max_pan" value="2.7" />
- <param name="max_tilt" value="1.4" />
- <param name="min_tilt" value="-0.4" />
- <param name="tilt_step" value="0.015" />
- <param name="pan_step" value="0.02" />
-
- <!-- Button maps for logitech -->
- <param name="run_button" value="5" type="int" />
- <param name="torso_dn_button" value="1" type="int" />
- <param name="torso_up_button" value="3" type="int" />
- <param name="head_button" value="6" type="int" />
- <param name="deadman_button" value="4" type="int"/>
-
- <node pkg="teleop_pr2" type="teleop_pr2" output="screen"/>
- </group>
-
-
-</launch>
Deleted: pkg/trunk/sandbox/texas/msg/TexasCmd.msg
===================================================================
--- pkg/trunk/sandbox/texas/msg/TexasCmd.msg 2009-09-02 03:47:56 UTC (rev 23668)
+++ pkg/trunk/sandbox/texas/msg/TexasCmd.msg 2009-09-02 03:50:32 UTC (rev 23669)
@@ -1,2 +0,0 @@
-float64 angle
-float64 velocity
\ No newline at end of file
Deleted: pkg/trunk/sandbox/texas/tdrive.py
===================================================================
--- pkg/trunk/sandbox/texas/tdrive.py 2009-09-02 03:47:56 UTC (rev 23668)
+++ pkg/trunk/sandbox/texas/tdrive.py 2009-09-02 03:50:32 UTC (rev 23669)
@@ -1,102 +0,0 @@
-#! /usr/bin/env python
-# Copyright (c) 2008, Willow Garage, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of the Willow Garage, Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-# Author: Dallas Goecker
-
-import time
-import random
-import roslib
-roslib.load_manifest('texas')
-import rospy
-from std_msgs.msg import Float64
-from mechanism_msgs.msg import JointStates
-from texas.msg import TexasCmd
-
-STRAIGHT = 0.82
-ROTATION_JOINT = 'bl_caster_rotation_joint'
-SPEED = 6.0
-PI = 3.14159
-
-class LastMessage():
- def __init__(self, topic, msg_type):
- self.msg = None
- rospy.Subscriber(topic, msg_type, self.callback)
-
- def last(self):
- return self.msg
-
- def callback(self, msg):
- self._last_time = rospy.get_time()
- self.msg = msg
-
- def get_timeout(self):
- return rospy.get_time() - self._last_time
-
-def main():
- angle = STRAIGHT
- speed = -SPEED
- last_time = 0
- rospy.init_node('tdrive', anonymous=True)
- last_state = LastMessage('/joint_states', JointStates)
- tx_cmd = LastMessage('texas_cmd', TexasCmd)
-
- pub_steer = rospy.Publisher("/caster_bl/caster/set_command", Float64)
- pub_drive = rospy.Publisher("/caster/drive_velocity", Float64)
- pub_steer.publish(Float64(0.0))
- pub_drive.publish(Float64(0.0))
- print "tdrive.py: Waiting for robot JointStates publication..."
- while not last_state.msg and not rospy.is_shutdown(): pass
- print "tdrive.py: Waiting for TexasCmd publication..."
- while not tx_cmd.msg and not rospy.is_shutdown(): pass
- print "tdrive.py: looping..."
- while not rospy.is_shutdown():
- time.sleep(0.10)
-
- # Get angle, velocity from command
- drive_cmd = tx_cmd.last()
- drive_vel = drive_cmd.velocity
- drive_angle = drive_cmd.angle
- # Safety timeout
- if tx_cmd.get_timeout() > 3:
- drive_vel = 0.0
-
- joint_state = last_state.last()
- rotation_state = None
- for state in joint_state.joints:
- if state.name == ROTATION_JOINT:
- rotation_state = state
- break
- if not rotation_state:
- print "The %s joint was not found in the mechanism state" % ROTATION_JOINT
-
- # Steers the caster to be straight
- pub_steer.publish(Float64(6.0 * (drive_angle - rotation_state.position)))
- pub_drive.publish(Float64(drive_vel))
-
-if __name__ == '__main__':
- main()
Deleted: pkg/trunk/sandbox/texas/teleop_texas_keyboard.cpp
===================================================================
--- pkg/trunk/sandbox/texas/teleop_texas_keyboard.cpp 2009-09-02 03:47:56 UTC (rev 23668)
+++ pkg/trunk/sandbox/texas/teleop_texas_keyboard.cpp 2009-09-02 03:50:32 UTC (rev 23669)
@@ -1,196 +0,0 @@
-/*
- * teleop_texas
- * Copyright (c) 2008, Willow Garage, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the <ORGANIZATION> nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-// Author: Kevin Watts
-
-/**
-
-@mainpage
-
-@b teleop_texas_keyboard Teleops a DallasBot from a keyboard
-
-<hr>
-
-@section usage Usage
-@verbatim
-$ teleop_texas_keyboard [standard ROS args]
-@endverbatim
-
-Key mappings are printed to screen on startup.
-
-<hr>
-
-@section topic ROS topics
-
-Subscribes to (name / type):
-- None
-
-Publishes to (name / type):
-- @b "texas/TexasCmd" : Command
-
-<hr>
-
-@section parameters ROS parameters
-
-- None
-
- **/
-
-#include <termios.h>
-#include <signal.h>
-#include <math.h>
-#include <stdlib.h>
-
-#include <ros/ros.h>
-
-#include <texas/TexasCmd.h>
-
-#define CMD_TOPIC "texas_cmd"
-
-#define KEYCODE_A 0x61
-#define KEYCODE_D 0x64
-#define KEYCODE_S 0x73
-#define KEYCODE_W 0x77
-
-class TeleopTexasKeyboard
-{
- private:
- double angle_, velocity_;
- double max_vel_;
-
- ros::NodeHandle n_;
- ros::Publisher texas_pub_;
-
- public:
- void init()
- {
- angle_ = 0.0;
- velocity_ = 0.0;
-
- texas_pub_ = n_.advertise<texas::TexasCmd>(CMD_TOPIC, 1);
-
- // Max velocity of caster
- n_.param("~max_vel", max_vel_, 6.0);
- }
-
- ~TeleopTexasKeyboard() { }
- void keyboardLoop();
-
-};
-
-int kfd = 0;
-struct termios cooked, raw;
-
-void quit(int sig)
-{
- tcsetattr(kfd, TCSANOW, &cooked);
- exit(0);
-}
-
-int main(int argc, char** argv)
-{
- ros::init(argc, argv, "head_keyboard");
-
- TeleopTexasKeyboard thk;
- thk.init();
-
- signal(SIGINT,quit);
-
- thk.keyboardLoop();
-
- return(0);
-}
-
-void TeleopTexasKeyboard::keyboardLoop()
-{
- char c;
- bool dirty=false;
-
- // get the console in raw mode
- tcgetattr(kfd, &cooked);
- memcpy(&raw, &cooked, sizeof(struct termios));
- raw.c_lflag &=~ (ICANON | ECHO);
- // Setting a new line, then end of file
- raw.c_cc[VEOL] = 1;
- raw.c_cc[VEOF] = 2;
- tcsetattr(kfd, TCSANOW, &raw);
-
- puts("Reading from keyboard");
- puts("---------------------------");
- puts("Use 'WASD' to move");
-
- for(;;)
- {
- // get the next event from the keyboard
- if(read(kfd, &c, 1) < 0)
- {
- perror("read():");
- exit(-1);
- }
-
- switch(c)
- {
- case KEYCODE_W:
- velocity_ += 1.0;
- dirty = true;
- break;
- case KEYCODE_S:
- velocity_ -= 1.0;
- dirty = true;
- break;
- case KEYCODE_A:
- angle_ += 0.5;
- dirty = true;
- break;
- case KEYCODE_D:
- angle_ -= 0.5;
- dirty = true;
- break;
- default:
- velocity_ = 0.0;
- dirty = true;
- break;
- }
-
- // Bound velocity
- velocity_ = std::max(std::min(velocity_, max_vel_), - max_vel_);
-
- if (dirty == true)
- {
- texas::TexasCmd cmd;
- cmd.angle = angle_;
- cmd.velocity = velocity_;
-
- texas_pub_.publish(cmd);
- }
-
-
- }
-}
Copied: pkg/trunk/sandbox/texas/texas.yaml (from rev 23667, pkg/trunk/sandbox/texas/dallas_base_controller.yaml)
===================================================================
--- pkg/trunk/sandbox/texas/texas.yaml (rev 0)
+++ pkg/trunk/sandbox/texas/texas.yaml 2009-09-02 03:50:32 UTC (rev 23669)
@@ -0,0 +1,46 @@
+caster_names: bl_caster_rotation_link
+
+type: Pr2BaseController
+
+caster_pid_gains: &caster_pid_gains
+ p: 3.0
+ d: 0.0
+ i: 0.1
+ i_clamp: 4.0
+wheel_pid_gains: &wheel_pid_gains
+ p: 2.0
+ d: 0.0
+ i: 0.01
+ i_clamp: 0.4
+
+bl_caster_l_wheel_joint:
+ *wheel_pid_gains
+bl_caster_r_wheel_joint:
+ *wheel_pid_gains
+
+bl_caster_rotation_joint:
+ *caster_pid_gains
+
+caster_speed_threshold: 0.2
+caster_position_error_threshold: 0.05
+wheel_speed_threshold: 0.2
+caster_effort_threshold: 3.45
+wheel_effort_threshold: 3.45
+kp_wheel_steer: 2.0
+alpha_stall: 0.5
+kp_caster_steer: 40.0
+timeout: 0.4
+max_accel:
+ ax: 1.0
+ ay: 2.0
+ alphaz: 2.0
+
+state_publish_time: 0.25
+
+max_vel:
+ vx: 1.0
+ vy: 1.0
+ omegaz: 2.0
+
+cmd_topic:
+ /cmd_vel
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <goe...@us...> - 2009-09-04 03:13:18
|
Revision: 23811
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=23811&view=rev
Author: goeckerd
Date: 2009-09-04 03:13:07 +0000 (Fri, 04 Sep 2009)
Log Message:
-----------
Deleted unneeded files and directories.
Removed Paths:
-------------
pkg/trunk/sandbox/texas/CMakeLists.txt
pkg/trunk/sandbox/texas/Makefile
pkg/trunk/sandbox/texas/bin/
pkg/trunk/sandbox/texas/controllers.xml
pkg/trunk/sandbox/texas/lib/
pkg/trunk/sandbox/texas/msg/
pkg/trunk/sandbox/texas/src/
Deleted: pkg/trunk/sandbox/texas/CMakeLists.txt
===================================================================
--- pkg/trunk/sandbox/texas/CMakeLists.txt 2009-09-04 03:08:58 UTC (rev 23810)
+++ pkg/trunk/sandbox/texas/CMakeLists.txt 2009-09-04 03:13:07 UTC (rev 23811)
@@ -1,30 +0,0 @@
-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)
-
-rospack(texas)
-
-#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
-genmsg() # TexasCmd
-#uncomment if you have defined services
-#gensrv()
-
-#common commands for building c++ executables and libraries
-#rospack_add_library(${PROJECT_NAME} src/example.cpp)
-#target_link_libraries(${PROJECT_NAME} another_library)
-#rospack_add_boost_directories()
-#rospack_link_boost(${PROJECT_NAME} thread)
-#rospack_add_executable(teleop_texas_keyboard teleop_texas_keyboard.cpp)
-#target_link_libraries(example ${PROJECT_NAME})
Deleted: pkg/trunk/sandbox/texas/Makefile
===================================================================
--- pkg/trunk/sandbox/texas/Makefile 2009-09-04 03:08:58 UTC (rev 23810)
+++ pkg/trunk/sandbox/texas/Makefile 2009-09-04 03:13:07 UTC (rev 23811)
@@ -1 +0,0 @@
-include $(shell rospack find mk)/cmake.mk
\ No newline at end of file
Deleted: pkg/trunk/sandbox/texas/controllers.xml
===================================================================
--- pkg/trunk/sandbox/texas/controllers.xml 2009-09-04 03:08:58 UTC (rev 23810)
+++ pkg/trunk/sandbox/texas/controllers.xml 2009-09-04 03:13:07 UTC (rev 23811)
@@ -1,9 +0,0 @@
-<controllers>
- <controller name="caster" type="CasterControllerNode">
- <joints caster="bl_caster_rotation_joint"
- wheel_l="bl_caster_l_wheel_joint"
- wheel_r="bl_caster_r_wheel_joint" />
- <caster_pid p="5.0" i="0" d="0" iClamp="0" />
- <wheel_pid p="4" i="0" d="0" iClamp="0" />
- </controller>
-</controllers>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|