Skip to content

Commit

Permalink
fix: fix overlap of tracked objects information on rviz
Browse files Browse the repository at this point in the history
  • Loading branch information
scepter914 committed Jun 1, 2022
1 parent 097ec8e commit cd8f0f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ void PredictedObjectsDisplay::processMessage(PredictedObjects::ConstSharedPtr ms

// Get marker for id
geometry_msgs::msg::Point uuid_vis_position;
uuid_vis_position.x = object.kinematics.initial_pose_with_covariance.pose.position.x - 0.5;
uuid_vis_position.y = object.kinematics.initial_pose_with_covariance.pose.position.y;
uuid_vis_position.x = object.kinematics.initial_pose_with_covariance.pose.position.x;
uuid_vis_position.y = object.kinematics.initial_pose_with_covariance.pose.position.y - 0.5;
uuid_vis_position.z = object.kinematics.initial_pose_with_covariance.pose.position.z - 0.5;

auto id_marker =
Expand All @@ -79,8 +79,8 @@ void PredictedObjectsDisplay::processMessage(PredictedObjects::ConstSharedPtr ms

// Get marker for velocity text
geometry_msgs::msg::Point vel_vis_position;
vel_vis_position.x = uuid_vis_position.x - 0.5;
vel_vis_position.y = uuid_vis_position.y;
vel_vis_position.x = uuid_vis_position.x;
vel_vis_position.y = uuid_vis_position.y - 0.5;
vel_vis_position.z = uuid_vis_position.z - 0.5;
auto velocity_text_marker = get_velocity_text_marker_ptr(
object.kinematics.initial_twist_with_covariance.twist, vel_vis_position,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ void TrackedObjectsDisplay::processMessage(TrackedObjects::ConstSharedPtr msg)

// Get marker for id
geometry_msgs::msg::Point uuid_vis_position;
uuid_vis_position.x = object.kinematics.pose_with_covariance.pose.position.x - 0.5;
uuid_vis_position.y = object.kinematics.pose_with_covariance.pose.position.y;
uuid_vis_position.x = object.kinematics.pose_with_covariance.pose.position.x;
uuid_vis_position.y = object.kinematics.pose_with_covariance.pose.position.y - 0.5;
uuid_vis_position.z = object.kinematics.pose_with_covariance.pose.position.z - 0.5;

auto id_marker =
Expand All @@ -81,8 +81,8 @@ void TrackedObjectsDisplay::processMessage(TrackedObjects::ConstSharedPtr msg)

// Get marker for velocity text
geometry_msgs::msg::Point vel_vis_position;
vel_vis_position.x = uuid_vis_position.x - 0.5;
vel_vis_position.y = uuid_vis_position.y;
vel_vis_position.x = uuid_vis_position.x;
vel_vis_position.y = uuid_vis_position.y - 0.5;
vel_vis_position.z = uuid_vis_position.z - 0.5;
auto velocity_text_marker = get_velocity_text_marker_ptr(
object.kinematics.twist_with_covariance.twist, vel_vis_position, object.classification);
Expand Down

0 comments on commit cd8f0f4

Please sign in to comment.