Skip to content

Commit

Permalink
Rename base_link as base_link_vis
Browse files Browse the repository at this point in the history
  • Loading branch information
iait committed Jan 28, 2021
1 parent 30f7d0a commit b79408f
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions config/costmap_common_params.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frames
global_frame: map
robot_base_frame: base_link
transform_tolerance: 1.0 # si la transformación entre map y base_link supera este valor el robot se detiene
robot_base_frame: base_link_vis
transform_tolerance: 1.0 # si la transformación entre map y base_link_vis supera este valor el robot se detiene

2 changes: 1 addition & 1 deletion config/fake_params.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
odom_frame_id: odom # Which frame to use for odometry
base_frame_id: base_link # Which frame to use for the robot base
base_frame_id: base_link_vis # Which frame to use for the robot base
global_frame_id: map # The name of the coordinate frame published by the localization system

2 changes: 1 addition & 1 deletion config/local_costmap_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ local_costmap:
enabled: true
observation_sources: point_cloud_sensor
obstacle_range: 15.0
point_cloud_sensor: {data_type: PointCloud, topic: point_cloud_full/sensor, sensor_frame: base_link, marking: true, clearing: true}
point_cloud_sensor: {data_type: PointCloud, topic: point_cloud_full/sensor, sensor_frame: base_link_vis, marking: true, clearing: true}


2 changes: 1 addition & 1 deletion rviz/config.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
base_link_vis:
Alpha: 1
Show Axes: false
Show Trail: false
Expand Down
6 changes: 3 additions & 3 deletions rviz/costmap.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
base_link_vis:
Alpha: 1
Show Axes: false
Show Trail: false
Expand Down Expand Up @@ -136,7 +136,7 @@ Visualization Manager:
Frame Timeout: 15
Frames:
All Enabled: false
base_link:
base_link_vis:
Value: true
chassis_link:
Value: false
Expand Down Expand Up @@ -174,7 +174,7 @@ Visualization Manager:
Tree:
map:
odom:
base_link:
base_link_vis:
chassis_link:
fork_fl_link:
wheel_fl_link:
Expand Down
6 changes: 3 additions & 3 deletions rviz/follower.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
base_link_vis:
Alpha: 1
Show Axes: false
Show Trail: false
Expand Down Expand Up @@ -338,7 +338,7 @@ Visualization Manager:
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 1.5697963237762451
Target Frame: base_link
Target Frame: base_link_vis
Value: ThirdPersonFollower (rviz)
Yaw: 3.1415927410125732
Saved:
Expand All @@ -359,7 +359,7 @@ Visualization Manager:
Name: ThirdPersonFollower
Near Clip Distance: 0.009999999776482582
Pitch: 1.5697963237762451
Target Frame: base_link
Target Frame: base_link_vis
Value: ThirdPersonFollower (rviz)
Yaw: 3.1415927410125732
Window Geometry:
Expand Down
2 changes: 1 addition & 1 deletion rviz/footprint.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
base_link_vis:
Alpha: 1
Show Axes: false
Show Trail: false
Expand Down
2 changes: 1 addition & 1 deletion rviz/global_planner.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
base_link_vis:
Alpha: 1
Show Axes: false
Show Trail: false
Expand Down
2 changes: 1 addition & 1 deletion rviz/local_planner.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
base_link_vis:
Alpha: 1
Show Axes: false
Show Trail: false
Expand Down
6 changes: 3 additions & 3 deletions rviz/odom.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
base_link_vis:
Alpha: 1
Show Axes: false
Show Trail: false
Expand Down Expand Up @@ -143,7 +143,7 @@ Visualization Manager:
Frame Timeout: 15
Frames:
All Enabled: false
base_link:
base_link_vis:
Value: true
chassis_link:
Value: false
Expand Down Expand Up @@ -183,7 +183,7 @@ Visualization Manager:
Tree:
map:
odom:
base_link:
base_link_vis:
chassis_link:
fork_fl_link:
wheel_fl_link:
Expand Down
6 changes: 3 additions & 3 deletions rviz/plant.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
base_link_vis:
Alpha: 1
Show Axes: false
Show Trail: false
Expand Down Expand Up @@ -137,7 +137,7 @@ Visualization Manager:
Frame Timeout: 15
Frames:
All Enabled: false
base_link:
base_link_vis:
Value: true
chassis_link:
Value: false
Expand Down Expand Up @@ -175,7 +175,7 @@ Visualization Manager:
Tree:
map:
odom:
base_link:
base_link_vis:
chassis_link:
fork_fl_link:
wheel_fl_link:
Expand Down
2 changes: 1 addition & 1 deletion rviz/potential_field.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
base_link_vis:
Alpha: 1
Show Axes: false
Show Trail: false
Expand Down
2 changes: 1 addition & 1 deletion rviz/teb.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
base_link_vis:
Alpha: 1
Show Axes: false
Show Trail: false
Expand Down
2 changes: 1 addition & 1 deletion rviz/top.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Visualization Manager:
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
base_link_vis:
Alpha: 1
Show Axes: false
Show Trail: false
Expand Down
4 changes: 2 additions & 2 deletions src/goal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ bool isRobotNearGoal(geometry_msgs::Pose pose, const tf::TransformListener& tf)
// obtiene el pose del robot
tf::StampedTransform transform;
ros::Time now = ros::Time::now();
tf.waitForTransform("map", "base_link", now, ros::Duration(2.0));
tf.lookupTransform("map", "base_link", now, transform);
tf.waitForTransform("map", "base_link_vis", now, ros::Duration(2.0));
tf.lookupTransform("map", "base_link_vis", now, transform);
tf::Matrix3x3 m(transform.getRotation());
double roll, pitch, yaw;
m.getRPY(roll, pitch, yaw);
Expand Down
18 changes: 9 additions & 9 deletions src/point_cloud_obstacle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,16 @@ int main(int argc, char** argv) {
// crea la nube de puntos
sensor_msgs::PointCloud pc;
pc.header.stamp = ros::Time::now();
pc.header.frame_id = "base_link";
pc.header.frame_id = "base_link_vis";

// obtiene la posición (x, y) del base_link del robot
// obtiene la posición (x, y) del base_link_vis del robot
tf::StampedTransform transform;
ros::Time now = ros::Time::now();
tf.waitForTransform("map", "base_link", now, ros::Duration(2.0));
tf.lookupTransform("map", "base_link", now, transform);
tf.waitForTransform("map", "base_link_vis", now, ros::Duration(2.0));
tf.lookupTransform("map", "base_link_vis", now, transform);
double baseLinkX = transform.getOrigin().x();
double baseLinkY = transform.getOrigin().y();
// ROS_INFO("base_link: (%.2f, %.2f)", baseLinkX, baseLinkY);
// ROS_INFO("base_link_vis: (%.2f, %.2f)", baseLinkX, baseLinkY);

// recorre las líneas
for (double lineX = startX; lineX <= endX; lineX += lineSeparation) {
Expand Down Expand Up @@ -157,18 +157,18 @@ int main(int argc, char** argv) {

// ROS_INFO("Se genera la planta en y %.2f", plantY);

// genera el punto del centro de la planta y lo transforma al frame base_link
// genera el punto del centro de la planta y lo transforma al frame base_link_vis
geometry_msgs::PointStamped mapPoint; // planta en frame map
mapPoint.header.frame_id = "map";
mapPoint.header.stamp = ros::Time();
mapPoint.point.x = lineX;
mapPoint.point.y = plantY;
mapPoint.point.z = 0.0;
geometry_msgs::PointStamped basePoint; // planta en frame base_link
geometry_msgs::PointStamped basePoint; // planta en frame base_link_vis
try {
tf.transformPoint("base_link", mapPoint, basePoint);
tf.transformPoint("base_link_vis", mapPoint, basePoint);
} catch(tf::TransformException& ex){
ROS_ERROR("Excepcion intentando hacer la transformacion de map a base_link: %s",
ROS_ERROR("Excepcion intentando hacer la transformacion de map a base_link_vis: %s",
ex.what());
continue;
}
Expand Down

0 comments on commit b79408f

Please sign in to comment.