6
$\begingroup$

I'm trying to add my own robot in Morse 1.1 (using Ubuntu 12.04). I am struggling to add an armature actuator and armature pose sensor to an existing robot. Can someone please explain how this can be done (preferably with some sample code and using the socket interface).

Thanks.

$\endgroup$

1 Answer 1

2
$\begingroup$

I hope you have already done Armature creation. If not you need to do that first. Components in MORSE are either robots, sensors or actuators. Robots are mainly containers for sensors and actuators. Assuming you already have an initial simulation environment called mysim, you can create a new sensor with:

$ morse add sensor <name> mysim

or, for actuators:

$ morse add actuator <name> mysim

Also I guess you are using Python. You need to implement a sub-class of morse.core.sensor.Sensor, respectively of morse.core.actuator.Actuator.

from morse.core.sensor import Sensor

class MyImageSensor(Sensor):

    _name = "MyImageSensor"
    _short_descr = "A custom Image Sensor"

You can know more on how to add more components from here. Also please note that Armature Pose sensor must be added as a child of the armature you want to sense. You can see an example source code here .

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.