Rotating a Camera on a Sphere: Finding a Coherent Direction

Click For Summary
SUMMARY

The discussion focuses on the challenge of rotating a camera attached to a robot arm along the surface of a sphere while maintaining specific orientation requirements. The camera's Z-axis must always point towards the sphere's origin, and its X-Y plane should remain aligned with the curvilinear direction to avoid singularity issues. The solution involves calculating rotation angles using spherical coordinates and quaternion mathematics to ensure the camera's orientation is coherent across multiple points on the sphere.

PREREQUISITES
  • Spherical coordinates (r, theta, phi)
  • Quaternion mathematics for rotation
  • Vector calculations in 3D space
  • Understanding of coordinate systems
NEXT STEPS
  • Study quaternion rotation techniques in 3D graphics
  • Learn about curvilinear coordinates and their applications
  • Explore camera control algorithms in robotics
  • Investigate methods for avoiding singularities in robotic motion
USEFUL FOR

Robotics engineers, computer graphics developers, and anyone involved in camera motion control or spherical coordinate systems will benefit from this discussion.

jimesh
Messages
1
Reaction score
0

Homework Statement


I have a task to move a camera attached to a robot arm along the surface of a sphere. The requirments are,
* Z axis of the camera coordinate system should always point to the origin of the sphere.
* X-Y plane of the camera coordinate system shold be always in the curvilinear direction... (this is because the camera sholuld not rotate its XY plane since the robot will reach singlaritty position at some point..)

The final result should be the rotation angles of the new coordinate system with respect to a world coordinate system at the origin of the sphere.

Homework Equations



Spherical coordinates (r,theta,phi)
x = r * Cos(theta) * Sin(theta);
y = r * Sin(theta) * Sin(phi);
z = r * Math.Cos(phi));

Solving for spherical coordinate we get points P1(x,y,z), P2(x,y,z), P3(x,y,z) etc.. on the sphere. These are the points where the origin of camera coordinate system should be.


The Attempt at a Solution



1. A world coordinate system at the origin of sphere
2. Create another coordinate system at P1, P2 etc which are identical to world coordinate sysem.
3. Calculate the vector from the origin of P1 to origin of world cordinate system (sphere origin)
4. Calculate a vector along the Z axis of the coordinate system at the point P1, say (0,0,1)
5. Find a rotation quaternion by clculating the normal to this 2 vectors and angle between these 2 vectors.

As a result I got the coordinate system at P1 rotates in such a way that Z axis is pointing to the origin of world coordinate system.

But now the problem is
* The camera (X-Y Plane) will also rotate when I move to next point P2 and do the same calculation using quaternion.
* I want to rotate this plane to a coherent direction (say curvilinear direction) at all points.
I tried to find a reference vector for this to rotate.. but couldn't..

any body has any idea.. ?
 
Physics news on Phys.org
curvilinear direction?

X-Y plane of the camera coordinate system shold be always in the curvilinear direction...Can you explain that in some other way?
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K