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

Get rotate angle to move a robot in 3D environment

asked 2018-03-19 19:26:27 -0500

bxl gravatar image

I have an UAV and my idea is to make it moves around some points I pass to it. My logic is the following:
1- Moves UAV in z-axis to adjust high;
2- Rotates around z-axis;
3- Moves forward on x-axis until reach the goal.

Step 1 works fine, but I'm getting problems on step number 2.
I have one coordinate frame for the the UAV and I get the angle between the uav and the point (in the world) as a transform between the frames of my goal_point and the UAV:

angle = transform_goal_robotPose.getRotation().getAngle();

However, I cannot get a metric to compare with and establish that the uav has rotated the correct angle and then can go to step 3. I was thinking about something like a comparison if (angle == expected_angle), but couldn't figure out none.
Someone knows how can I get it?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-19 22:23:37 -0500

AndyZe gravatar image

Have a look at the look_at_pose package. It will do that calculation for you.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-03-19 19:26:27 -0500

Seen: 412 times

Last updated: Mar 19 '18