|
From: <hsu...@us...> - 2008-11-11 01:29:22
|
Revision: 6491
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=6491&view=rev
Author: hsujohnhsu
Date: 2008-11-11 01:29:19 +0000 (Tue, 11 Nov 2008)
Log Message:
-----------
update for fake IMU publishing.
Modified Paths:
--------------
pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/P3D.hh
pkg/trunk/drivers/simulator/gazebo_plugin/src/P3D.cc
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_floorobj.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_prototype1.world
pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_wg.world
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/P3D.hh
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/P3D.hh 2008-11-11 01:20:56 UTC (rev 6490)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/include/gazebo_plugin/P3D.hh 2008-11-11 01:29:19 UTC (rev 6491)
@@ -53,6 +53,7 @@
<updateRate>1000.0</updateRate>
<bodyName>body_name</bodyName>
<topicName>body_pose_ground_truth</topicName>
+ <IMUTopicName>body_pose_IMU</IMUTopicName>
<frameName>map</frameName>
<xyzOffsets>25.65 25.65 0</xyzOffsets> <!-- option to initialize odometry for fake localization-->
<rpyOffsets>0 0 0</rpyOffsets>
@@ -77,6 +78,7 @@
<updateRate>1000.0</updateRate>
<bodyName>body_name</bodyName>
<topicName>body_pose_ground_truth</topicName>
+ <IMUTopicName>body_pose_IMU</IMUTopicName>
<frameName>map</frameName>
<xyzOffsets>25.65 25.65 0</xyzOffsets> <!-- option to initialize odometry for fake localization-->
<rpyOffsets>0 0 0</rpyOffsets>
@@ -125,6 +127,7 @@
/// \brief topic name
private: std::string topicName;
+ private: std::string IMUTopicName;
/// \brief frame transform name, should match link name
/// FIXME: extract link name directly?
Modified: pkg/trunk/drivers/simulator/gazebo_plugin/src/P3D.cc
===================================================================
--- pkg/trunk/drivers/simulator/gazebo_plugin/src/P3D.cc 2008-11-11 01:20:56 UTC (rev 6490)
+++ pkg/trunk/drivers/simulator/gazebo_plugin/src/P3D.cc 2008-11-11 01:29:19 UTC (rev 6491)
@@ -78,14 +78,15 @@
this->myBody = dynamic_cast<Body*>(this->myParent->GetBody(bodyName));
// this->myBody = dynamic_cast<Body*>(this->myParent->GetBody(bodyName));
- this->topicName = node->GetString("topicName", "", 1);
- this->frameName = node->GetString("frameName", "", 1);
- this->xyzOffsets = node->GetVector3("xyzOffsets", Vector3(0,0,0));
- this->rpyOffsets = node->GetVector3("rpyOffsets", Vector3(0,0,0));
+ this->topicName = node->GetString("topicName", "ground_truth", 1);
+ this->IMUTopicName = node->GetString("IMUTopicName", "imu", 1);
+ this->frameName = node->GetString("frameName", "", 1);
+ this->xyzOffsets = node->GetVector3("xyzOffsets", Vector3(0,0,0));
+ this->rpyOffsets = node->GetVector3("rpyOffsets", Vector3(0,0,0));
std::cout << "==== topic name for P3D ======== " << this->topicName << std::endl;
rosnode->advertise<std_msgs::TransformWithRateStamped>(this->topicName,10);
- rosnode->advertise<std_msgs::PoseWithRatesStamped>(this->topicName,10);
+ rosnode->advertise<std_msgs::PoseWithRatesStamped>(this->IMUTopicName,10);
}
////////////////////////////////////////////////////////////////////////////////
@@ -207,7 +208,7 @@
this->poseMsg.acc.ang_acc.az = this->aeul.z;
// publish to ros
- rosnode->publish(this->topicName,this->poseMsg);
+ rosnode->publish(this->IMUTopicName,this->poseMsg);
this->lock.unlock();
// save last time stamp
@@ -219,4 +220,5 @@
void P3D::FiniChild()
{
rosnode->unadvertise(this->topicName);
+ rosnode->unadvertise(this->IMUTopicName);
}
Modified: pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot.world
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot.world 2008-11-11 01:20:56 UTC (rev 6490)
+++ pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot.world 2008-11-11 01:29:19 UTC (rev 6491)
@@ -333,6 +333,7 @@
<updateRate>1000.0</updateRate>
<bodyName>gripper_roll_right</bodyName>
<topicName>gripper_roll_right_pose_ground_truth</topicName>
+ <IMUTopicName>gripper_roll_right_pose_imu</IMUTopicName>
<frameName>map</frameName>
<interface:position name="p3d_right_wrist_position"/>
</controller:P3D>
@@ -342,6 +343,7 @@
<updateRate>1000.0</updateRate>
<bodyName>gripper_roll_left</bodyName>
<topicName>gripper_roll_left_pose_ground_truth</topicName>
+ <IMUTopicName>gripper_roll_left_pose_imu</IMUTopicName>
<frameName>map</frameName>
<interface:position name="p3d_left_wrist_position"/>
</controller:P3D>
@@ -351,6 +353,7 @@
<updateRate>1000.0</updateRate>
<bodyName>base</bodyName>
<topicName>base_pose_ground_truth</topicName>
+ <IMUTopicName>base_pose_imu</IMUTopicName>
<frameName>map</frameName>
<xyzOffsets>25.65 25.65 0</xyzOffsets> <!-- initialize odometry for fake localization-->
<rpyOffsets>0 0 0</rpyOffsets>
Modified: pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_floorobj.world
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_floorobj.world 2008-11-11 01:20:56 UTC (rev 6490)
+++ pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_floorobj.world 2008-11-11 01:29:19 UTC (rev 6491)
@@ -354,6 +354,7 @@
<updateRate>1000.0</updateRate>
<bodyName>gripper_roll_right</bodyName>
<topicName>gripper_roll_right_pose_ground_truth</topicName>
+ <IMUTopicName>gripper_roll_right_pose_imu</IMUTopicName>
<frameName>map</frameName>
<interface:position name="p3d_right_wrist_position"/>
</controller:P3D>
@@ -363,6 +364,7 @@
<updateRate>1000.0</updateRate>
<bodyName>gripper_roll_left</bodyName>
<topicName>gripper_roll_left_pose_ground_truth</topicName>
+ <IMUTopicName>gripper_roll_left_pose_imu</IMUTopicName>
<frameName>map</frameName>
<interface:position name="p3d_left_wrist_position"/>
</controller:P3D>
@@ -372,6 +374,7 @@
<updateRate>1000.0</updateRate>
<bodyName>base</bodyName>
<topicName>base_pose_ground_truth</topicName>
+ <IMUTopicName>base_pose_imu</IMUTopicName>
<frameName>map</frameName>
<xyzOffsets>25.65 25.65 0</xyzOffsets> <!-- initialize odometry for fake localization-->
<rpyOffsets>0 0 0</rpyOffsets>
Modified: pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_prototype1.world
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_prototype1.world 2008-11-11 01:20:56 UTC (rev 6490)
+++ pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_prototype1.world 2008-11-11 01:29:19 UTC (rev 6491)
@@ -138,6 +138,7 @@
<updateRate>100.0</updateRate>
<bodyName>base</bodyName>
<topicName>base_pose_ground_truth</topicName>
+ <IMUTopicName>base_pose_imu</IMUTopicName>
<frameName>map</frameName>
<xyzOffsets>25.65 25.65 0</xyzOffsets> <!-- initialize odometry for fake localization-->
<rpyOffsets>0 0 0</rpyOffsets>
Modified: pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_wg.world
===================================================================
--- pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_wg.world 2008-11-11 01:20:56 UTC (rev 6490)
+++ pkg/trunk/robot_descriptions/gazebo_robot_description/world/robot_wg.world 2008-11-11 01:29:19 UTC (rev 6491)
@@ -193,6 +193,7 @@
<updateRate>1000.0</updateRate>
<bodyName>gripper_roll_right</bodyName>
<topicName>gripper_roll_right_pose_ground_truth</topicName>
+ <IMUTopicName>gripper_roll_right_pose_imu</IMUTopicName>
<frameName>map</frameName>
<interface:position name="p3d_right_wrist_position"/>
</controller:P3D>
@@ -202,6 +203,7 @@
<updateRate>1000.0</updateRate>
<bodyName>gripper_roll_left</bodyName>
<topicName>gripper_roll_left_pose_ground_truth</topicName>
+ <IMUTopicName>gripper_roll_left_pose_imu</IMUTopicName>
<frameName>map</frameName>
<interface:position name="p3d_left_wrist_position"/>
</controller:P3D>
@@ -211,6 +213,7 @@
<updateRate>1000.0</updateRate>
<bodyName>base</bodyName>
<topicName>base_pose_ground_truth</topicName>
+ <IMUTopicName>base_pose_imu</IMUTopicName>
<frameName>map</frameName>
<xyzOffsets>25.65 25.65 0</xyzOffsets> <!-- initialize odometry for fake localization-->
<rpyOffsets>0 0 0</rpyOffsets>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|