Aller au contenu


Contenu de Caiman

Il y a 2 élément(s) pour Caiman (recherche limitée depuis 03-avril 13)


#113881 install IMU on minus

Posté par Caiman sur 10 juillet 2021 - 03:01 dans Vigibot

for this i am using ampu-9250/6500 IMU 

connect the 4 corresponding wires to the IMU

VCC to 3.3 / 3v

GND to GND

SCl to SCl

SDA to SDA

 

 

just like the color tracking setup you need to edit the frame.hpp   https://www.robot-ma...tracking-minus/

If You have already done this you can skip this step

ssh into the robot.
login pi 
 
run following command. Note: These number can differ per robot: for minus with pan, tilt and side-arms use these numbers
 
sudo nano /usr/local/vigiclient/opencv/frame.hpp
on #define REMOTEFRAMESIZE "number" up the number by 4
on #define TELEMETRYFRAMESIZE "number" up the number by 4
on #define NBCOMMANDS to "3"  
 
save this file by using the pressing "control X" pres "Y" for yes hit enter 
type the following commands 
sudo -s
cd / usr / local / vigiclient / opencv
./make.sh
you will see that the robot compiles a few things.
hit enter a few times  
when the following line appears the compiling is done "root @ raspberrypi: / usr / local / vigiclient / opencv #"
 
 
in the website go to hardware settings edit the following
go to cameras 
edit TYPE: to "Autopilot"
edit SOURCE: to "3"
now scroll all the way down.
exchange 
WRITEUSERDEVICE: to "1"
READUSERDEVICE: to "1"
 
a red and green icon should appear in the video feed of the robot 
if not reboot.
 
thanx for Firened and OdorousWo1f
 
 



#113876 Enable Color Tracking minus

Posté par Caiman sur 10 juillet 2021 - 12:36 dans Vigibot

Enable opencv Color Tracking
"Please note that this only works with Raspberry PI 3A +, 3B + and Pi 4"
ssh into the robot.
login pi 
 
run following command Note: These number can differ per robot: for minus with pan, tilt and side-arms use these numbers
 
sudo nano /usr/local/vigiclient/opencv/frame.hpp
on #define REMOTEFRAMESIZE "number"    up the number by 4
on #define TELEMETRYFRAMESIZE "number" up the number by 4
on #define NBCOMMANDS to "3"  
 
save this file by using the pressing "control X" pres "Y" for yes hit enter 
type the following commands 
sudo -s
cd / usr / local / vigiclient / opencv
./make.sh
 
you will see that the robot compiles a few things.
hit enter a few times  
when the following line appears the compiling is done "root @ raspberrypi: / usr / local / vigiclient / opencv #"
 
in the website settings edit the following
go to cameras 
edit TYPE: to "Autopilot"
edit SOURCE: to "2"
now scroll all the way down.
exchange 
WRITEUSERDEVICE: to "1"
READUSERDEVICE : to "1"
 
Reboot the robot and the color tracking should work 
-------------------------------------------------------------------------------------------------------------------------------------------------------------
 
if you want to make an extra tool so you can turn of the color tracking do the following 
add this under your side arms control, starting on line 410. you need to add a comma after the } on side arms. below that paste this.
 
{
      "NAME": "OpenCV Color Tracking",
      "CAMERA": 1,
      "MIXING": 0,
      "GAINX": 80,
      "GAINY": 80
    }
 
on your hardware config, add this under your first virtual camera
{
      "TYPE": "Autopilot",
      "SOURCE": 2,
      "WIDTH": 640,
      "HEIGHT": 480,
      "FPS": 30,
      "BITRATE": 1000000,
      "ROTATE": 0,
      "BRIGHTNESS": 50,
      "CONTRAST": -5,
      "BRIGHTNESSBOOST": 80,
      "CONTRASTBOOST": 100
    }
 
 
should now look like this 
{
      "TYPE": "",
      "SOURCE": 0,
      "WIDTH": 640,
      "HEIGHT": 480,
      "FPS": 30,
      "BITRATE": 1000000,
      "ROTATE": 0,
      "BRIGHTNESS": 50,
      "CONTRAST": -5,
      "BRIGHTNESSBOOST": 80,
      "CONTRASTBOOST": 100
    },
    {
      "TYPE": "Autopilot",
      "SOURCE": 2,
      "WIDTH": 640,
      "HEIGHT": 480,
      "FPS": 30,
      "BITRATE": 1000000,
      "ROTATE": 0,
      "BRIGHTNESS": 50,
      "CONTRAST": -5,
      "BRIGHTNESSBOOST": 80,
      "CONTRASTBOOST": 100
    }
  ],
 
now if you switch tools after the sidearms  open cv should start up.
 
huge thanx to OdorousWo1f, Pascal and simba