I would like to drive it with the servo controller of one of the two components.

It’s exactly as the title says.

First, there is a pair of gears, but they exist as different components rather than being bundled within the same component.

Is it possible to set one of the different components as a servo controller and then find the servo controller with the other component (gear) set so that it can move?

When you run this script, you will get the following results:

File “BEARING::PythonScript”, line 49, in OnStart
AttributeError: ‘NoneType’ object has no attribute ‘moveImmediate’
Traceback (most recent call last):
File “BEARING::PythonScript”, line 62, in OnRun
AttributeError: ‘NoneType’ object has no attribute ‘setJointTarget’

I’m asking for help on what the problem is.


In this case if your components are named as “G1” and “G2” then if you want to move anything within the script of “G1” you have to first find the “G2” component. Here is an example script:

# script of G1
app = getApplication()
G_two = app.findComponent('G2')
# access servo
servo_G_two = G_two.findBehaviour('Servo Controller') 

In your case the output is giving you complaints because whatever you’re trying to get returned None type. So what you’re trying to write is basically None.moveImmediate() and None.setJointTarget() instead of object.method()