This file is indexed.

/usr/lib/python3/dist-packages/morse/actuators/external_force.py is in python3-morse-simulator 1.4-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import logging; logger = logging.getLogger("morse." + __name__)
import morse.core.actuator
from morse.helpers.components import add_data

class ExternalForce(morse.core.actuator.Actuator):
    """
    This class will read force and torque as input from an external
    middleware, and applys them to the associated robot in the global
    frame.

    It allows to simulate impact of the environment on the robot, such
    as wind, flow, ...
    """

    _name = "External Force/Torque "
    _short_desc= "Force and torque generated by the environment"

    add_data('force', [0.0, 0.0, 0.0], "vec3<float>", "force along x, y, z")
    add_data('torque', [0.0, 0.0, 0.0], "vec3<float>", "torque around x, y, z")

    def __init__(self, obj, parent=None):
        logger.info('%s initialization' % obj.name)
        morse.core.actuator.Actuator.__init__(self, obj, parent)
        logger.info('Component initialized')

    def default_action(self):
        robot = self.robot_parent.bge_object

        robot.applyForce(self.local_data['force'], False)
        robot.applyTorque(self.local_data['torque'], False)