Help needed to find a way to make my camera look less choppy

I have the rough movement of my game setup. (source code can be found here http://sites.google.com/site/kartoongames/games/Starbound3D.tar.gz?attredirects=0 It is controlled by the mouse but one problem i would like to fix is that when you move the camera is updated to be 150 units behind the player at all times. But it jumps from one position to the other as you can see if you downloaded my source code. I know im not the only one who has experience with this so im asking anyone if they know what i can do to make the camera less jumpy.

You have 3 tasks to update the rotations and positions of your ship and the camera. I suggest you merge them together into one task.
If in 3 tasks, I suspect the task order is not well known and probably you have your camera position updated before your ship’s position updated. It may then cause the problem.

And you can reparent the camera to your ship if you want it to be fixed. Or you may add more logic to the camera control to make it dynamically follow the ship like the effect of youtube.com/watch?v=a5Gy578goIQ

   def playerMove(self, task):
        if mouseXPos < -0.15:
            newH = self.ship.getH() - mouseXPos * self.turningSpeed
            self.ship.setH(newH)
        if mouseXPos > 0.15:
            newH = self.ship.getH() - mouseXPos * self.turningSpeed
            self.ship.setH(newH)

        if mouseYPos < -0.15:
            newP = self.ship.getP() + mouseYPos * self.turningSpeed
            self.ship.setP(newP)
        if mouseYPos > 0.15:
            newP = self.ship.getP() + mouseYPos * self.turningSpeed
            self.ship.setP(newP)
        self.ship.setY(self.ship, self.thrustingSpeedMax)
        camera.setPos(self.ship , 0, - 150, 0 )
        camera.setHpr(self.ship.getHpr())
        return Task.cont

thank you i think ill eventually make it dynamic but for now ill reparent it. I know exactly how to make the camera dynamicly follow too . Thanks!