Skip to content

Fabio53443/Rosita-CoppeliaSim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

ROSITA in CoppeliaSim

What is this?

This repo hosts our (Marte(llo) team) attempt at making a somewhat working and accurate replica of the 4WD ROSITA rover.

Installation

  1. Install CoppeliaSim from here
  2. Clone this repo
  3. Install dipendencies (pip -r requirements.txt)

(for 4.6.x and below) IMPORTANT: Apply patch to Coppelia's remote API

append to <installFolder>/addOns/ZMQ remote API server.lua the following before opening Coppelia

sim.saveImage = wrap(sim.saveImage, function(origFunc)
    return function(img, res, opt, nm, q)
        local ret = origFunc(img, res, opt, nm, q)
        if type(ret) ~= 'string' then
            ret = ''
        end
        return ret
    end
end)

Using it

  1. In Coppelia, run the simulation
  2. Write your code in "src/main.py", and run that.

Available functions:

  1. getImage() - Will shoot a picture from the built in virtual camera and save it in a pictures folder inside the repo folder. Returns the path to which the picture was saved.
  2. scanTag(path) - Will check any image for one or more QR Code and return values found. Meant to be used with as scanTag(getImage()).
  3. pan(rad) and tilt(rad) - Pans or tilts the camera. Angle in radiants.
  4. setSpeed4W(fl, fr, bl, br, time) - Sets the wheels' speed, respectively, front left, front right, back left, back right, for a determinted amount of time (provided in seconds as a parameter).
  5. stop() - Sets the speed of all the wheels to 0.

Thanks to the CoppeliaSim team for providing the patch (see CoppeliaSim Forum for more details.

Development

The reccomanded way to develop this project is by using venvs. This can be done, in Pycharm, by cloning the repository and by answering "yes" in the venv prompt.

Screenshots

image image

About

CoppeliaSim implementation of the ROSITA robot

Resources

License

Stars

Watchers

Forks

Languages