Simulating a roller

I'm trying to produce a simulation for a set of rollers to act as a conveyor to feed boxes to my robot. I'm struggling to determine the best approach. I have created an extension to SingleShapeEntity that applies a torque in its Update method and I do end up with a rotating roller. Only problem with this is that it responds to gravity and other objects and gets pushed around and falls to the ground. If I set the object as kinematic, it doesn't rotate and I get lots of errors about applying torque to kinematic objects. Can anyone point me in the right direction, either to make my kinematic object rotate and move other objects or give me a better approach to making a roller?

[691 byte] By [TimWrightUK] at [2008-1-9]
# 1

You don't want your roller to be kinematic because the physics engine will not move a kinematic object (and complains if you try to make it move the kinematic object by applying torque to it).

If you want your roller to be elevated above the ground, you need to make it part of a multishape entity. Put a heavy shape on the ground to give the entity stability and include the roller shape with a localPose on the shape that puts it above the ground and at the proper orientation. The physics engine will consider the roller shape and the base shape to be one object even if they aren't touching each other.

Look at the example of the TableEntity in SimulationTutorial2 to see how to put a multishape entity together and to specify a different pose for each shape in the entity.

-Kyle

KyleJ-MSFT at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...
# 2
What about sticking these rollers to some kind of wall with joints?

.oO(that's the problem with realistic physics, you need bearings, to hold your entities in their position as in real world )

AlexanderDahl at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...
# 3

I've got this cracked now, thanks for the pointers. I have gone down the route of making it more realistic by creating two side frames for the conveyor and attaching the rollers to these with joints. On one side I've made the joint apply torque and the roller rotates. I've fixed the whole structure in space by resting it on kinematic boxes at the required height. Boxes that I place on the conveyor now travel along (and fall off).

Next step to add a service to start/stop the conveyor and a sensor to detect the box position...

TimWrightUK at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...

Microsoft Robotics Studio

Site Classified