ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rviz_visual_tools indigo not defined.. publishpath or publishline

asked 2016-12-01 08:39:41 -0500

mutu gravatar image

Hey all,

anyone here who worked with the rviz_visual_tools under indigo? How can i visualize a path of my waypoints of my computecartesianpath-function in rviz? the waypoints are defined as geometry_msgs/path and the publishpath-function of rviz_visual_tools only works with geometry_msgs/point. I tried something like:

namespace rvt  = rviz_visual_tools;
rviz_visual_tools::RvizVisualTools visual_tools("odom_combined");

std::vector<geometry_msgs::Pose> waypoints;
geometry_msgs::Pose target_pose3;
target_pose3.position.x=0.02;
target_pose3.position.y=0.12;
target_pose3.position.z=0.25;
target_pose3.orientation.x=0.75;
target_pose3.orientation.y=0.48;
target_pose3.orientation.z=-0.31;
target_pose3.orientation.w=0.32;
waypoints.push_back(target_pose3);

target_pose3.position.x=0.27;
target_pose3.position.y=-0.06;
target_pose3.position.z=0.18;
target_pose3.orientation.x=0.315;
target_pose3.orientation.y=0.902;
target_pose3.orientation.z=0.021;
target_pose3.orientation.w=0.29;
waypoints.push_back(target_pose3);

moveit_msgs::RobotTrajectory trajectory;
double fraction = group.computeCartesianPath(waypoints, 0.01, 0.0, trajectory);
ROS_INFO("Visualize CartesianPath (%.2f%% acheived)",fraction*100);

geometry_msgs::Point path[waypoints.size()];
for(int i=0; i<waypoints.size(); i++)
{
path[i] = waypoints[i].position;
std::cout << "Point: " << path[i] << "\n";
}

visual_tools.deleteAllMarkers();
visual_tools.publishLine(path[0], path[1], rvt::RED, rvt::LARGE);

The Errorcode is: "Not defined reference"(translated it from german: Nicht definierter Verweis) for every function of the rviz_visual_tools. Do you have any suggestions?

Thank you!

ali

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-21 06:38:52 -0500

Sokrates gravatar image

Have you found a solution to this yet? I'm struggling as well...

Thank you for your Answer.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-01 08:39:41 -0500

Seen: 202 times

Last updated: Dec 01 '16