GithubHelp home page GithubHelp logo

poppy-project / pypot Goto Github PK

View Code? Open in Web Editor NEW
249.0 63.0 138.0 113.22 MB

Python library for controlling dynamixel motors. Documentation available here:

Home Page: https://docs.poppy-project.org/en/software-libraries/pypot.html

License: GNU General Public License v3.0

Python 99.31% Lua 0.69%
robot poppy dynamixel motors ax12 mx28 xl-320 dynamixel-motors python robotics

pypot's Introduction

PyPI Build Status DOI

Pypot ⚙️ A Python library for Dynamixel motor control

Pypot is a cross-platform Python library making it easy and fast to control custom robots based on multiple models of Dynamixel motors. Use Pypot to:

  • control Robotis motors through USB2Dynamixel, USB2AX or Pixl 4 Raspberry Pi devices,
  • define kinematic chains of a custom robot and control it through high-level commands (Forward & Inverse Kinematics),
  • define primitives (motions applying to motor groups) and easily combine them to create custom complex behaviors (Robot dance, arm shaking, writing with a pen...).
  • define sensor access and processing (QRCode detection, force sensors, RGB-D, ...)

Pypot is also compatible with the CoppeliaSim simulator (formerly V-REP), embeds a REST API for Web-based control, and supports visual programming via Scratch and Snap.

🔌 Compatible hardware

Compatible motors: MX-106, MX-64, MX-28, MX-12, AX-12, AX-18, RX-24, RX-28, RX-64, XL-320, SR-RH4D, EX-106. Derivated versions are also supported (e.g. MX-28AT, MX-28R, MX-28T, ...). Both protocols v1 and v2 are supported but v2 is used only for XL-320. Use Herborist to help detect IDs and baudrates of motors.

Compatible sensors: Kinect 1, QRCode from RGB camera, sonar, micro-switch from Raspberry Pi GPIO, digital or analog sensor connected to Arduino

Compatible interpreters: Python 3.6, 3.7, 3.8, 3.9

Other models of motors and sensors can be integrated with little effort and time. Other programming languages may be connected through the REST API.

Read 📖 Documentation and get ⁉️ Assistance

Pypot is part of the opensource Poppy project

Pypot is part of the Poppy project aiming at developing robotic creations that are easy to build, customize, deploy, and share. It promotes open-source by sharing 3D-printed hardware, software, and web tools.

The Poppy creatures are:

  • Poppy Humanoid: a kid-size humanoid robot designed for biped locomotion and physical human-robot interaction (25 DoF) for biped research and university workshops,
  • Poppy Torso: just the torso of the humanoid robot, with a suction pad to stick it attach it firmly to a desk (13 DoF) for HRI research, university and high school workshops
  • Poppy Ergo Jr: a low-cost robotic arm for primary to middle school (6 Dof) for primary or middle school workshops

Poppy Humanoid

All those creatures are based on a combination of standard dynamixel actuators, 3D printed parts and open-source electronics such as Arduino boards. Both the hardware (3D models, electronics...) and software can be freely used, modified and duplicated.

💻 Installation

If you are using a Poppy robot embedding a Raspberry Pi, Pypot is already shipped with it. For custom robots, just type ⌨️ pip install pypot in your system terminal!

If you intend to modify or add features to Pypot, create a virtual environment and install it from sources instead:

git clone https://github.com/poppy-project/pypot
cd pypot/pypot
pip install .

Additional drivers may be needed for USB2serial, depending of your OS. Check here:

  • USB2AX - this device is designed to manage TTL communication only
  • USB2Dynamixel - this device can manage both TTL and RS485 communication.
  • Pixl board for RaspberryPi

👨‍💻 Contributing

If this is the first time you contribute to Pypot, it is a good idea to share your work on the forum first, we will be happy to give you a hand so that you can contribute to the opensource project.

pypot's People

Contributors

antoinepringalle avatar aristofor avatar barraq avatar blackpowder avatar bumblebeefr avatar buschbapti avatar caerbannog avatar cjlux avatar clement-moulin-frier avatar dashdashzako avatar dschofie avatar etiennebalit avatar fgolemo avatar gregwar avatar jgrizou avatar jjehl avatar manon-cortial avatar matthieu-lapeyre avatar paulmand3l avatar pierre-rouanet avatar rzr avatar sebastien-forestier avatar show0k avatar sonelu avatar stevenguyen avatar tdiazt avatar tibo42 avatar timgates42 avatar tirkarthi avatar ymollard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pypot's Issues

Improve the handle of DXL alert message

Add proper message indicating which motors have raised an alert.

Also maybe these alerts should not kill the program but rather launch an alert primitive to safely stop the robot ?

Incorrect json response

1/ I created a new HttpServer like below

import os
import poppytools

import json
import pypot
import argparse

import zerorpc

from pypot.robot import from_json
from pypot.server import HTTPRobotServer

print pypot.__version__
print pypot.__path__

from pypot.vrep import from_vrep

config_path = 'poppy_config.json'
scene_path = 'poppy-standing2.ttt'


with open(config_path) as cf:
    config = json.load(cf)

robot = from_vrep(config, '127.0.0.1', 19997, scene_path,
                  tracked_objects=['left_hand_tracker', 'right_hand_tracker'])

#robot.start_sync()

server = HTTPRobotServer(robot, '0.0.0.0', 4242)
server.run()

time.sleep(1) 

2/ I implemented a js client using jquery to display the motors list coming from motor/list.json rest web service, the js client is here : https://github.com/louzar/poppy_web_client/blob/master/motors.html

3/ I'm getting a js exception saying Uncaught SyntaxError: Unexpected token.

4/ The Js client can't parse json response, because it's not well formatted, please look at the snapshot here : https://raw.githubusercontent.com/louzar/poppy_web_client/master/resources/Screenshot%20from%202015-01-01%2021:00:37.png

Security features

During the Maker Faire, a Poppy motor has melted because it has reached an extremely high temperature.

We could of course run a safe primitive checking for temperature state but maybe there is another way, more low level, embedded in pypot avoiding to let a $250 motor broke it self just because user is stupid ? Maybe not ...

Change from_config to dynamicaly set missing motors as broken

It would be a nice feature to be able to instantiate a PoppyCreature from config (eg. from a json config file) while there is missing motors. It is boring to have to modify by hand the json when we are testing new configurations or when there is a broken wire.
Eventually it shouldn’t be the default behaviour, but it could be started from the poppy creature

poppy = PoppyTorso(allow_missing_motors=True)

root install pypot

if your are install pypot with the commande : sudo pip install pypot, then it is impossible to open snap with xml preload because the file was write with root access despite being in the local folder.

Connect pypot to the v-rep simulator

We want to connect pypot to the v-rep simulator.
The goal would be that you can transparently switch from your simulated robot to the real one.

It could be done thanks to v-rep remote API and by surcharging the low-level IO of pypot.

We could also use their script system to simulate the Dynamixel motors behavior.

Rest API examples in Ruby

Hello all,

I did a small ruby code to control Poppy's. It should be model agnositic and get all the motor names, and registers and the possiblity to set the registers.

Where should I post this ?  Maybe we could create a folder...
Pypot / samples / REST / ruby / motorControl.rb .
If it's ok, I can create a pull request.

Cheers,

Jeremy.

Connect pypot to a visual programming language

We are considering connecting pypot to one (or more) VPL available (see here for a review).

Indeed, we think that robotics can play an important role in educational program as a great tool for kids to learn mechanics, electronics, and programming. With the Poppy Project we are in touch with many schools and association around the world to start such collaborations.

Any thought on great language or tools?

remoteApi.so not found on cubietruck even though the file exists in the location

After installing pypot 2.0 (also pyserial and numpy), while importing pypot.dynamixel or pypot.robot gives error "OSError : /usr/local/lib/python2.7/dist-packages/pypot/vrep/remoteApiBindings/lib/linux/32Bit/remoteApi.so: cannot open shared object file: No such file or directory" After checking the given location the file and the directory exists but pypot is unable to recognize it.

Deal with AX12 timeouts

There is timeouts errors far more often with AX12 motors than MX or RX.
A solution could be to override the init of AbstractDxlIO (the default is 0.05s) in DxlIO to increase timeout if models are AX12 or AX18.

Ideas for a new REST API

Now a day we have two APIs: SnapRobotServer and HTTPRobotServer without any technical raisons. It would be useful to rewrite a new one.
We can use this issue to add ideas of usefull features we would like to add on it:

  • can be used to instantiate the robot (for reseting)
  • ability to get (download) and post (uplaod) a record file
  • the possibility to have different robot discussing to each other (@pierre-rouanet)
  • can use websockets or server side events of enabling a long pooling mode which will reduce tcp connexion latency
  • ...

A good explanation of the differences between a REST and a resources-oriented API (the model behind SnapRobotServer and HTTPRobotServer).

Changing update function in the LoopPrimitive

To avoid adding this line pypot.primitive.LoopPrimitive.update() in each update function of an inherited class of LoopPrimitive (as explained here), we could maybe just do something like this in the LoopPrimitive class:

Class LoopPrimitive(...):
    [...]
def _update(self):
    logger.debug('LoopPrimitive %s updated.', self)
    self.update()

def update(self):
    pass

def run(self, *args, **kwargs):
       """ Calls the :meth:`~pypot.primitive.primitive.Primitive.update` method at a predefined frequency (runs until stopped). """

       while not self.should_stop():
           start = time.time()
           self._update(*self.args, **self.kwargs)
           end = time.time()

          bla bla

Herborist: Changing at the same time the id and the baudrate raises error

If you change the baudrate (e.g. 1MBaud) and the id (1 to xx), it raises a timeout issue:

/pypot/pypot/dynamixel/io.py", line 514, in __real_send
    raise DxlTimeoutError(self, instruction_packet, instruction_packet.id)
pypot.dynamixel.io.DxlTimeoutError: motors 1 did not respond after sending DxlReadDataPacket(id=1, address=0, length=2)

I guess it does not handle well the change of id and therefore throw a timeout will trying to read the old id.

Comportment of logger WARNING for pypot.dynamixel.error

Pypot is flooding logs outputs with Timeout error (at 50Hz). This can cause creation of big files, or filling all the available RAM...
A solution could be to implement an handler on WARNING output, to summarize the outputs.

Use descriptor for motor register

Thanks to Python's descriptor we should be able to refactor code in the motor: i.e. accessing the registers.
Is there any other places where descriptors could be used? In the primitives?

This is also a very promising way of having callback notifying when values are accessed!

Dependency missing: "ImportError: No module named enum"

When running the poppy-reset-motor:

  File "..pypot/pypot/dynamixel/conversion.py", line 18, in <module>
    from enum import Enum
ImportError: No module named enum

Patch:

pip install enum

I thought you just forget to put enum in the setup but there is a "enum34", maybe it is because it is after numpy which installation is not done correctly by pip ?

Efficient software security to prevent motor overheating

As explained in #27, Dynamixel motors have a temperature security in firmware which disable the motor in case of overheating ; but this is not working very well. @matthieu-lapeyre added a "temperature monitoring" primitive in Poppy Humanoid, which simply check if a motor is higher than a certain temperature and in case of dangerous temperature it trigged an alarm sound in the robot and display message in the standard output with logger.WARNING.

It works better than the Dynamixel one, but:

  • it is simply an information for the user. If the user don't read the standard output and have unplugged the speaker of the robot, no action will be made
  • this primitive use only the current value of the present_temperature to trigger the alarm. The temperature sensor sadly far from the motor in the MX28 or MX64, so the motor can burn with a 50°C viewed temperature from the sensor in in the board...

I suggest to add a smarter (easy to say) and proactive security loop which can be modified by each motors as a register.

Rather than just monitoring the current present_temperature, we could monitor the speed of the present_temperature changes, and the load.

It is not an easy task because many factors can change the interpretation of the raw datas. It is between signal processing and machine learning (we should burn lot of motors and monitor their temperature to have a good dataset ?).

Strange Typeerror when changing goto_behaviour in a MockupRobot

If I change the goto_behaviour from 'minjerk' to 'dummy' in the setup() or the update() of a LoopPrimitive class, I got this TypeError:

Exception in thread Thread-9:
Traceback (most recent call last):
  File "/home/theo/miniconda/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/home/theo/miniconda/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/theo/Documents/code/pypot/pypot/utils/stoppablethread.py", line 119, in _wrapped_target
    self._target()
  File "/home/theo/Documents/code/pypot/pypot/utils/stoppablethread.py", line 179, in run
    make_update_loop(self, self._update)
  File "/home/theo/Documents/code/pypot/pypot/utils/stoppablethread.py", line 152, in make_update_loop
    update_func()
  File "/home/theo/Documents/code/pypot/pypot/primitive/manager.py", line 58, in update
    filtred_val = self._filter(val)
  File "/home/theo/miniconda/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 1719, in sum
    out=out, keepdims=keepdims)
  File "/home/theo/miniconda/lib/python2.7/site-packages/numpy/core/_methods.py", line 32, in _sum
    return umr_sum(a, axis, dtype, out, keepdims)
TypeError: cannot perform reduce with flexible type

Any idea @pierre-rouanet ?

Logging mechanisms

We would like to add mechanisms for logging useful information such as:

  • packages sent on the dynamixel bus
  • motor command
  • primitives order

We want to take advantage of the logging module so users are free to choose what they want to log and how to format it.

Managing the way primitives are combined

By default, the manager take the mean of primitives orders. Until now, to change this behaviour, the easiest way was to edit the default parameter directly in the Primitive manager classe. For example:

class PrimitiveManager(threading.Thread):
    def __init__(self, motors, freq=50, filter=partial(numpy.mean, axis=0)):

to

class PrimitiveManager(threading.Thread):
    def __init__(self, motors, freq=50, filter=partial(numpy.sum, axis=0)):

But since a week, pypot can be installed using pip or easy_install. This means it is less relevant to ask people to find source and change it.

It is maybe time to try some new features allowing to tune this parameter easily ?

A first quick&ugly patch could be to add a method to change the filter of the manager.
For example:

class PrimitiveManager(threading.Thread):
    def __init__(self, motors, freq=50, filter=partial(numpy.mean, axis=0)):

    [...]

    @property
    def primitive_filter(self):
        return self._filter

    @primitive_filter.getter
    def primitive_filter(self, new_filter):
        self._filter = new_filter

However, having the same filter for all parameters of all primitives is maybe not always desirable.
For example, we would like to sum position to have relative motion. At the same time, summing torque_limit parameter can lead to have torque_limit >100%. It is even worse with the tuning of PID gains ...

So it becomes a complex problem and should be discussed. Yet I do not know where it should be, here in the github issues or on the poppy forum ?

Adding the wheel mode control at the robot level

Can we add the wheel mode control to the robot please ? :)

I guess we could add an option in the motor configuration such as allow_wheel_mode = true

Also it would be of course great to be able to change it dynamically in a robot primitive :)

Usage of poppy-shell and poppy-snap

poppy-snap and poppy-shell have not the same convention of input parameters

$ poppy-snap --help
usage: poppy-snap [-h] [--vrep] [--no-browser] {poppy-ergo,poppy-humanoid}

positional arguments:
  {poppy-ergo,poppy-humanoid}

optional arguments:
  -h, --help            show this help message and exit
  --vrep
  --no-browser

and poppy-shell:

$ poppy-shell --help
usage: poppy-shell [-h] [-l] [--vrep] [creature]

IPython Poppy Shell launcher.

positional arguments:
  creature    Poppy creature name

optional arguments:
  -h, --help  show this help message and exit
  -l, --list  List poppy creatures
  --vrep      Use a V-REP simulated Poppy Creature

In poppy-shell we have to call it with -l argument to show creature list, and creatures haven’t the same name:

$ poppy-shell --list
Poppy creatures :
    Ergo
    Humanoid
    Humanoid

.. and it may be a bug, I have 2 times 'Humanoid' output.

I think it's confusing for users.

Compliance sync issue

When motors are compliant and I set a goal position, motors will make a short convulsion before becoming compliant again.
Any idea @pierre-rouanet ?

P.S. It is an old bug as far as I know

install fails with python3.5

on archlinux (python3 is the default version of the system):

% pip install pypot                                                                                                  :(
Collecting pypot
  Using cached pypot-2.10.0-py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/lib/python3.5/site-packages (from pypot)
Requirement already satisfied (use --upgrade to upgrade): pyserial>2.6 in /usr/lib/python3.5/site-packages (from pypot)
Collecting enum34 (from pypot)
  Using cached enum34-1.0.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "/tmp/pip-build-n0t1h_pe/enum34/enum/__init__.py", line 371, in __getattr__
        return cls._member_map_[name]
    KeyError: '_convert'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 3, in <module>
      File "/usr/lib/python3.5/site-packages/setuptools/__init__.py", line 12, in <module>
        from setuptools.extension import Extension
      File "/usr/lib/python3.5/site-packages/setuptools/extension.py", line 8, in <module>
        from .dist import _get_unpatched
      File "/usr/lib/python3.5/site-packages/setuptools/dist.py", line 16, in <module>
        from setuptools.depends import Require
      File "/usr/lib/python3.5/site-packages/setuptools/depends.py", line 6, in <module>
        from setuptools import compat
      File "/usr/lib/python3.5/site-packages/setuptools/compat.py", line 45, in <module>
        import http.client as httplib
      File "/usr/lib/python3.5/http/client.py", line 71, in <module>
        import email.parser
      File "/usr/lib/python3.5/email/parser.py", line 12, in <module>
        from email.feedparser import FeedParser, BytesFeedParser
      File "/usr/lib/python3.5/email/feedparser.py", line 27, in <module>
        from email import message
      File "/usr/lib/python3.5/email/message.py", line 16, in <module>
        from email import utils
      File "/usr/lib/python3.5/email/utils.py", line 29, in <module>
        import socket
      File "/usr/lib/python3.5/socket.py", line 73, in <module>
        IntEnum._convert(
      File "/tmp/pip-build-n0t1h_pe/enum34/enum/__init__.py", line 373, in __getattr__
        raise AttributeError(name)
    AttributeError: _convert

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-n0t1h_pe/enum34

If I get this right, pypot fails when trying to install enum34. Which would make sense since I'm running python 3.5, which does not need a backport of enums ...

Write an alternative MovePlayer primitive without scipy

Scipy is necessary only for the MovePlayer primitive. We intended to use it elsewhere but it wasn't done. Making scipy optional will facilitate the installation from pip on Linux, and it will facilitate the way to do a standalone executable for windows with the visualisator.

Unable to use Snap! when pypot is installed with pip as root

Hi !

I've tried to launch a simulated poppy with V-rep, and to use Snap! to interact with it. (I'm using Debian)

When I install pypot with pip as root, and I create an instance of Poppy using poppy-snap or within the python shell with poppy = PoppyHumanoid(simulator='vrep', use_snap=True) then the following error is returned :

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "poppy/creatures/abstractcreature.py", line 101, in __new__
  File "pypot/server/snap.py", line 48, in __init__
    set_snap_server_variables(find_local_ip(), port)
  File "pypot/server/snap.py", line 31, in set_snap_server_variables
    with open(filename, 'w') as xf:
IOError: [Errno 13] Permission denied: 'pypot-snap-record-orchestration-demo.xml'

I've gathered that snap.py writes the user's IP address and port to 3 XML files, starting with the one mentioned above. And indeed, the write permission for the XML files in the pypot/server/ directory is limited to root.

When I install pypot with no root privileges, then I owned the files and I have write permission: the simulation works! But that may bring troubles for systems with multiple users using the pypot library.

Update : I can't reproduce the following part anymore (I did it twice yesterday).
When I install pypot as root using the setup.py script provided in the Git repo, the write permission is, once again, only given to root. But it's working fine! And yet, I haven't understood why.

IOError: [Errno 22] Invalid argument

On MacOS with a USB2Dynamixel Dongle:

import pypot.dynamixel
print pypot.__version__
>>> 1.7.0

print pypot.dynamixel.get_available_ports()
>>> ['/dev/tty.usbserial-A4008amd']
dxl_io = pypot.dynamixel.DxlIO('/dev/tty.usbserial-A4008amd', baudrate=1000000)

---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-2-74c525e53907> in <module>()
----> 1 dxl_io = pypot.dynamixel.DxlIO('/dev/tty.usbserial-A4008amd', baudrate=1000000)

/Users/matthieulapeyre/Development/pypot/pypot/dynamixel/io.pyc in __init__(self, port, baudrate, timeout, use_sync_read, error_handler_cls, convert)
     67         self._serial_lock = threading.Lock()
     68 
---> 69         self.open(port, baudrate, timeout)
     70 
     71     def __enter__(self):

/Users/matthieulapeyre/Development/pypot/pypot/dynamixel/io.pyc in open(self, port, baudrate, timeout)
     90 
     91             """
---> 92         self._open(port, baudrate, timeout)
     93         logger.info("Opening port '%s'", self.port,
     94                     extra={'port': port,

/Users/matthieulapeyre/Development/pypot/pypot/dynamixel/io.pyc in _open(self, port, baudrate, timeout, max_recursion)
    120                     self._serial.close()
    121 
--> 122                 self._serial = serial.Serial(port, baudrate, timeout=timeout)
    123                 self.__used_ports.add(port)
    124 

/usr/local/lib/python2.7/site-packages/serial/serialutil.pyc in __init__(self, port, baudrate, bytesize, parity, stopbits, timeout, xonxoff, rtscts, writeTimeout, dsrdtr, interCharTimeout)
    280 
    281         if port is not None:
--> 282             self.open()
    283 
    284     def isOpen(self):

/usr/local/lib/python2.7/site-packages/serial/serialposix.pyc in open(self)
    294 
    295         try:
--> 296             self._reconfigurePort()
    297         except:
    298             try:

/usr/local/lib/python2.7/site-packages/serial/serialposix.pyc in _reconfigurePort(self)
    429         # apply custom baud rate, if any
    430         if custom_baud is not None:
--> 431             set_special_baudrate(self, custom_baud)
    432 
    433     def close(self):

/usr/local/lib/python2.7/site-packages/serial/serialposix.pyc in set_special_baudrate(port, baudrate)
    146             buf = array.array('i', [baudrate])
    147             IOSSIOSPEED = 0x80045402 #_IOW('T', 2, speed_t)
--> 148             fcntl.ioctl(port.fd, IOSSIOSPEED, buf, 1)
    149     else: # version < 8
    150         def set_special_baudrate(port, baudrate):

IOError: [Errno 22] Invalid argument

Behaviour with impossible targets in 'goto_position' method in V-REP

If I type the below command

poppy.head_z.goto_position(5000,0)

the head_z motor will be blocked and no other commands (in the range of the real motor positions limits) will affect this motor.
This strange behaviour is only present on the V-REP simulator.

Should it not raise an error if the goto_position or goal_position commands are beyond motors limits ?

Timeout with remote V-REP instance

I tried to connect a local python code to a remote V-REP instance and I got a timeout error. By remote I mean another computer (windows 8 if it changes anything) over the internet (ping ~40ms).
Here is the trace:

In [7]: poppy = PoppyTorso(simulator='vrep',host=*****)
---------------------------------------------------------------------------
VrepIOErrors                              Traceback (most recent call last)
<ipython-input-7-222e689296fb> in <module>()
----> 1 poppy = PoppyTorso(simulator='vrep',host=*****)

/usr/local/lib/python2.7/dist-packages/poppy_creature-1.5.3-py2.7.egg/poppy/creatures/abstractcreature.pyc in __new__(cls, base_path, config, simulator, scene, host, port, id, use_snap, snap_host, snap_port, sync)
     67             # TODO: use the id so we can have multiple poppy creatures
     68             # inside a single vrep scene
---> 69             poppy_creature = from_vrep(config, host, port, scene)
     70             poppy_creature.simulated = True
     71 

local/path/pypot/pypot/vrep/__init__.pyc in from_vrep(config, vrep_host, vrep_port, scene, tracked_objects, tracked_collisions)
     87 
     88     vc = VrepController(vrep_io, scene, motors)
---> 89     vc._init_vrep_streaming()
     90 
     91     sensor_controllers = []

local/path/pypot/pypot/vrep/controller.pyc in _init_vrep_streaming(self)
     79             for vrep_call in ['simxGetJointPosition', 'simxGetJointForce']:
     80                 self.io.call_remote_api(vrep_call,
---> 81                                         self.io.get_object_handle(m.name),
     82                                         streaming=True,
     83                                         _force=True)

local/path/pypot/pypot/vrep/io.pyc in get_object_handle(self, obj)
    190         """ Gets the vrep object handle. """
    191         if obj not in self._object_handles:
--> 192             self._object_handles[obj] = self._get_object_handle(obj=obj)
    193 
    194         return self._object_handles[obj]

local/path/pypot/pypot/vrep/io.pyc in _get_object_handle(self, obj)
    185 
    186     def _get_object_handle(self, obj):
--> 187         return self.call_remote_api('simxGetObjectHandle', obj)
    188 
    189     def get_object_handle(self, obj):

local/path/pypot/pypot/vrep/io.pyc in call_remote_api(self, func_name, *args, **kwargs)
    303             msg = ' '.join([vrep_error[2 ** i]
    304                             for i, e in enumerate(err) if e])
--> 305             raise VrepIOErrors(msg)
    306 
    307         return res

VrepIOErrors: No value Timeout


This is strange because the scene was loaded in V-REP. The problem come from V-REP itself ?

Investigate PID register in MX28 firmware

The "new" MX28 firmware seems to have change the order of the PID register to a DIP.

" The control table’s order for PID has changed to DIP from this version onwards. Please make reference of this change."
But... it is not sure of which version changed this feature.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.