Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong goal Visualization #60

Open
ChamzasKonstantinos opened this issue Jan 1, 2020 · 5 comments
Open

Wrong goal Visualization #60

ChamzasKonstantinos opened this issue Jan 1, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@ChamzasKonstantinos
Copy link
Contributor

I think there is something wrong in the goal visulization code, regarding the rotations. The Wrong goal visualization can be seen in the first figure. This is happening after I merged #57 to my code
doulbe_goal
One arrow is by directly using addArrowMarker, and the other is using the goal Visulization
double_goal_solution
An IK solution is shown to verify the the addArrowMarker works.

The code to reproduce this is the following

`

auto base_to_object =
tf2::transformToEigen(lookup("base_link", "vicon_object_server/" + object));

auto epose = base_to_object * rpose;

// Region properties
auto tol = Eigen::Vector3d{0.001, 0.001, 0.001};
auto region = robowflex::Geometry::makeBox(0.01, 0.01, 0.01);
auto rot = Eigen::Quaterniond();

// Visualizing,
robowflex::MotionRequestBuilder vrequest(planner_, GROUP);

// //  // wrist_roll_link is the default end effector
vrequest.setGoalRegion("wrist_roll_link", "base_link", epose, region, rot, tol);

rviz.removeMarker("goal");
rviz.removeMarker("test");

rviz.addGoalMarker("test", vrequest);
rviz.addArrowMarker("goal", "base_link", epose, Eigen::Vector4d{0.2, 0.3, 0.7, 1.0},
                    Eigen::Vector3d{0.1, 0.008, 0.003});
rviz.updateMarkers();

waitForUserConfirmation("Find the IK solution");

// Pulling the current scene
arm_with_torso_.pullScene(scene_);

// Finding the an IK solution
if (!fetch_->setFromIKCollisionAware(scene_, GROUP, region, epose, rot, tol))
{
    ROS_WARN("No IK solution found for %s aborting ...", object.c_str());
    return false;
}

rviz.visualizeCurrentState();
request.setGoalConfiguration(fetch_->getScratchState());

`

@zkingston
Copy link
Contributor

Was this fixed by your recent pull?

@ChamzasKonstantinos
Copy link
Contributor Author

ChamzasKonstantinos commented Jul 9, 2020

To tell you the truth, I don't know I stopped using addGoalMarker and started using addArrowMarker. I can check it sometime later

@zkingston
Copy link
Contributor

Can you follow up on this?

@ChamzasKonstantinos
Copy link
Contributor Author

Argh, It is actually a bit hard for me to reproduce right now, since I stopped using the pose goals, and I use only joint goals and addArrowMarker. Maybe we can close for now. It only has to do with an rviz helper function it's not that important anyway

@ChamzasKonstantinos
Copy link
Contributor Author

I tested this again, and it still not working as expecting the goal is orientation is wrong. There must be something wrong in this function, but I don't know what
https://github.com/KavrakiLab/robowflex/blob/master/robowflex_library/src/io/visualization.cpp#L259

@zkingston zkingston added the bug Something isn't working label Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants