Rc Car Robot with steering servo
#1
Posté 01 août 2021 - 11:06
However, now I want to build an RC car that can explore with it's own 4g connection. This is a standard radio controlled car, 1:10 scale with a single brushed dc motor driving all 4 wheels and a steering servo for proportional control of the front wheels. I am using raspberry pi 3a+ and a pca9685 board. I have so far configured it successfully to drive the Esc, and hence the motor for forward and backward control through vigibot. Here is my problem: left and right control cannot be achieved using the arrow buttons as the software assumes 2 motors using differential steering. My first thought to get around this was to map the steering servo to camera pan, which actually works quite well, except when using a controller it does not reset the steering to the central position when letting go of the joystick.
How can I make it so that the left and right arrows control the steering servo only?
Many, many thanks again for your efforts and sorry that I am not able to communicate in French!
Daniel
(Edinburgh, Scotland)
- Mulsore aime ceci
#2
Posté 02 août 2021 - 05:58
Hello drm1309, welcome here and don't worry you can write in english here
Yes of course you can do exactly what you want and we will help you to do that!
You can either config the joystick you used to automaticaly reset it to central position when letting it go or configure the config to have left and right arrows controlling steering ( you can also have both enabled at same time if you want it x) )
To set set up arrows :
In the standard hardware config you have " Two motors " ( "Outputs " ) that are by default configured for differential steering using arrows thanks to COMMANDS8 and GAINS8. ( Commands8 represents the 8 bits command generated by the arrows, you have 3 8 bits commands available : 0 wich is X axis usually left right translation, 1 wich is Y axis usually forward backward and 2 z axis wich is usually rotating left and right )
By modifying COMMANDS8 and GAINS8 in the OUTPUT you can achieve what you want.
For example you can modify " left wheels " into " forward backard " by just removing the line 1 => 1 : 2 in COMMANDS8 ( Here the Number 2 represent the Z axis rotating left right ... we are removing it since we don't need it for a forward backward move) and removing the corresponding gain in GAIN8 ( if only 1 item in Commands8 you should have only one item in Gain8 ... )
You can modify right wheels into " steering ' by removing le line 0 : 0: 1 in commands 8 ( 1 is for Y axis ... not needed for steering ... ) and don't forget to update GAINS8 ...
For auto reset on the joystick you can edit the software config and check the box REINITX in MIXING on the tool you connected your steering motor
If you are not sure about what you should do just write your robot name here and I will edit your config
Si mon commentaire vous a plus laissez nous un avis !
Nouveau sur Robot Maker ?
Jetez un oeil aux blogs, aux tutoriels, aux ouvrages, au robotscope aux articles, à la boutique et aux différents services disponible !
En attendant qu'une bibliothèque de fichiers 3D soit mise en place n'hésitez pas à demander si vous avez besoin du fichier 3D d'un des produits de la boutique... On l'a peut être !
Si vous souhaitez un robot pilotable par internet n'hésitez pas à visiter www.vigibot.com et à lire le sous forum dédié à vigibot!
#3
Posté 02 août 2021 - 01:25
Thank you so much. It worked perfectly! Now I am just waiting on a mini 4g router to install into the car.
When this arrives, I will need to have the RPi connect to this new network SSID. How can I do this without having to reflash and change wpa_supplicant?
Secondly, if I do ever have to reflash the RPi for any reason, how can I save the configuration changes I have made on Vigibot.com? Is it as simple as just naming it exactly the same as the old robot and it will automatically connect back to that account with those settings, or does that not work?
Thanks again!
Daniel
#4
Posté 02 août 2021 - 07:32
First : You don't have to reflash the PI, if you keep your robot online it will automatically update if an update is needed.
You would only need to reflash if we make too many updates with your robot being disconnected ( robot disconnected few months for example )
If you need to change the ssid you can just add a new wpa_supplicant file on the SD ... . You can set multitple SSID / password on the wpa-supplicant file and set priority orders ...Else you can also do it by connecting on your pi via ssh
Second : Yes just name your robot exactly the same and it will have all the parameters...They are stored on the Server. If you make two twin robots you can even give them the same name they will both appear on vigibot and have the exact same parameters. The only things not on vigibot are the " custom script " but these are only made by more advanced users.
Best regards!
- Forthman aime ceci
Si mon commentaire vous a plus laissez nous un avis !
Nouveau sur Robot Maker ?
Jetez un oeil aux blogs, aux tutoriels, aux ouvrages, au robotscope aux articles, à la boutique et aux différents services disponible !
En attendant qu'une bibliothèque de fichiers 3D soit mise en place n'hésitez pas à demander si vous avez besoin du fichier 3D d'un des produits de la boutique... On l'a peut être !
Si vous souhaitez un robot pilotable par internet n'hésitez pas à visiter www.vigibot.com et à lire le sous forum dédié à vigibot!
#5
Posté 03 août 2021 - 03:11
That's amazing. Thank you so much again! Forgive me for having such basic knowledge.... My steering is reversed i.e left button makes the servo turn the wheels to the right. How can I fix this? Also, how can I map the xbox controller so that the right trigger is forwards, left trigger is brake and steering is just the x axis of the left joystick?
Thank you!
#6
Posté 03 août 2021 - 03:40
if your steering is reversed you can reverse the sign of the "GAINS8" on the motor used for steering =) in Outputs in the hardware config.
About the xbox controller I should check that...
Si mon commentaire vous a plus laissez nous un avis !
Nouveau sur Robot Maker ?
Jetez un oeil aux blogs, aux tutoriels, aux ouvrages, au robotscope aux articles, à la boutique et aux différents services disponible !
En attendant qu'une bibliothèque de fichiers 3D soit mise en place n'hésitez pas à demander si vous avez besoin du fichier 3D d'un des produits de la boutique... On l'a peut être !
Si vous souhaitez un robot pilotable par internet n'hésitez pas à visiter www.vigibot.com et à lire le sous forum dédié à vigibot!
#7
Posté 03 août 2021 - 04:42
It's coming along very nicely! Thank you so much for your help. This software is amazing. I will recommend it to everyone who will listen I think next I will add a pan/tilt mount for the camera and maybe get a better quality camera. Yes, getting the triggers to work on the Xbox controller would be really good. Otherwise, it would be good to at least have throttle and steering on separate joysticks
- Forthman aime ceci
#8
Posté 05 août 2021 - 04:42
Hello So, after some testing I have found that REINIT X and Y work only if I control the screen with mouse or touch. When using the analogue joystick on the Xbox One controller, it does not return to centre even when released
So, I'm left with controlling both steering and throttle through the left joystick only, as per your first instructions. There is a little bit of a problem with this which is that you are not able to access full steering and full throttle at the same time. I.e you cannot turn left at full lock and also go forwards at full speed. This is because with a single joystick pointing up and left, it does not actuate full throttle and full left steering, rather it reduces both by a little.
In the testing I've done, it seems that the triggers are being seen as on/off buttons rather than axes. (It looks like one is for "boost the engines" and I'm not sure about the other.
Any ideas on how I can achieve steering control with one axis (either left stick or trigger combination) and throttle with another?
Thanks again!
#9
Posté 05 août 2021 - 07:14
Hello,
Vigibot is more focused on "native" ways available to drive a robots on your phone and PC such as touchscreen and mouse + keyboards ... Remote control with gamepad is not fully developped yet ... So right now not everything is configurable but we will work on it =).
About the full steering + full throttle not available at same time : if you really want it, it is possible to adjust the setting ( gains ) to match with the hardware limitation provided by the controller. The only disadvantage is that by making such modification you will be at full speed on your robot before being at " full speed " on the joystick, and it will impact all users even those not using gamepad.
For example if max on x and y axis is -1 +1 when only moving one axis, but that max you can have by moving both axis at the same time is +- 0.5 / +- 0.5 then you can multiply gains by 2 ...
When in diagonal you will have full speed on both axis, but when moving a single axis max speed will be reach at half the joystick course ... so sensitivity is increased... ( In your case I guess that the correct value is more 0.75 instead of 0.5 but I think that you have the idea )
For the other part the easyest way would be to allow me to adjust your config live and see if it is working like you want ... I need to understand well what is you current situation, by seing it in action. So just tell me when you are available I will help you directly on Vigibot.com =)
Si mon commentaire vous a plus laissez nous un avis !
Nouveau sur Robot Maker ?
Jetez un oeil aux blogs, aux tutoriels, aux ouvrages, au robotscope aux articles, à la boutique et aux différents services disponible !
En attendant qu'une bibliothèque de fichiers 3D soit mise en place n'hésitez pas à demander si vous avez besoin du fichier 3D d'un des produits de la boutique... On l'a peut être !
Si vous souhaitez un robot pilotable par internet n'hésitez pas à visiter www.vigibot.com et à lire le sous forum dédié à vigibot!
#10
Posté 08 août 2021 - 03:30
So, I took the robot out into the world for its first test today! It performed really well, the Vigibot website is incredibly reliable and easy to use. I love how it makes sure that the steering is centred and the motor is off if signal is lost. Very safe!
The only real issue that I had is that the signal became very choppy in places. The robot is using a 4G LTE router mounted inside above the 5v battery pack. My phone, or laptop, is using my phone's hotspot. In some areas, the signal was constantly cutting out making the robot constantly stop. I suppose this is probably just due to poor coverage in that area (it was a little bit outside of the city), but is there anything I can do to improve this? Would lowering the camera resolution make it any more reliable? Or any other ideas?
Hope you're all doing well and having as much fun with Vigibot as I am!
#11
Posté 08 août 2021 - 11:03
You can lower the camera resolution but it will not help a lot ...
The best thing is to try to improve reception, for example by adding an antenna / a better antenna if your router have some, and put the antenna above your robot as high as you can...
If your router does not have antenna mount the router on top of the robot as high as you can ... On our small Minus with 4G, the 4G usb stick is mounted vertically ...
Do you managed to have it working as you want or do you still need some help for the configuration?
Si mon commentaire vous a plus laissez nous un avis !
Nouveau sur Robot Maker ?
Jetez un oeil aux blogs, aux tutoriels, aux ouvrages, au robotscope aux articles, à la boutique et aux différents services disponible !
En attendant qu'une bibliothèque de fichiers 3D soit mise en place n'hésitez pas à demander si vous avez besoin du fichier 3D d'un des produits de la boutique... On l'a peut être !
Si vous souhaitez un robot pilotable par internet n'hésitez pas à visiter www.vigibot.com et à lire le sous forum dédié à vigibot!
#12
Posté 09 août 2021 - 10:59
Yes, to be honest the mobile phone interface worked out to be best for it. It just needs to be an outdoor robot so that it has space to roam as it's quite fast!
I was thinking, there might be a good and cheap way of building a very capable robot easily based on a cheap 1:18 or 1:16 scale rc car... Mine is 1:10 scale, but most of the cheaper smaller rc cars come with an integrated receiver/esc. If we could find a cheap and working esc/motor pair, or even just a motor controller for the raspberry pi that would work with the motor and bypass the esc altogether, then maybe this would be a very cheap platform for a robust outdoor robot using vigibot!
#13
Posté 09 août 2021 - 12:56
If you find a good cheap RC candidate for such task feel free to share I am also looking for this kind of stuff! =)
Si mon commentaire vous a plus laissez nous un avis !
Nouveau sur Robot Maker ?
Jetez un oeil aux blogs, aux tutoriels, aux ouvrages, au robotscope aux articles, à la boutique et aux différents services disponible !
En attendant qu'une bibliothèque de fichiers 3D soit mise en place n'hésitez pas à demander si vous avez besoin du fichier 3D d'un des produits de la boutique... On l'a peut être !
Si vous souhaitez un robot pilotable par internet n'hésitez pas à visiter www.vigibot.com et à lire le sous forum dédié à vigibot!
Répondre à ce sujet
0 utilisateur(s) li(sen)t ce sujet
0 members, 0 guests, 0 anonymous users