Giter Club home page Giter Club logo

mycar's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

chubang122

mycar's Issues

4.手柄控制小车报错

前提:我用的小车配置与博客中基本相同,唯一区别是没加摄像头。第3节网页控制程序可以正常运行并且控制,有些不足的地方是控制不太灵敏。
问题:1.在正常运行第4节程序时报错
`jetbot@jetson-4-3:~/mycar$ bin/run.sh config/joystick_drive.yml 120
2020-10-21 15:03:31,330.330.89566230773926:root:548221059088:INFO:9089:Parsing config file to add car components...
2020-10-21 15:03:31,342.342.91887283325195:root:548221059088:INFO:9089:Added car component - ZmqCAN
2020-10-21 15:03:41,592.592.5478935241699:root:548221059088:INFO:9089:Added car component - PWMSteering
2020-10-21 15:03:41,593.593.2631492614746:root:548221059088:INFO:9089:Added car component - PWMThrottle
2020-10-21 15:03:42,922.922.0921993255615:root:548221059088:INFO:9089:Added car component - Camera
2020-10-21 15:03:42,933.933.1676959991455:VideoRecorder:548221059088:INFO:9089:VideoRecorder will save video to ./capture.avi
2020-10-21 15:03:42,935.935.2767467498779:root:548221059088:INFO:9089:Added car component - VideoRecorder
2020-10-21 15:03:42,961.961.125373840332:root:548221059088:INFO:9089:Added car component - JoystickController
2020-10-21 15:03:42,966.966.6993618011475:root:548221059088:INFO:9089:ZMQ (client) CAN started.
2020-10-21 15:03:42,972.972.08571434021:root:548221059088:INFO:9089:ZMQ (client) CAN started.
2020-10-21 15:03:42,987.987.9539012908936:root:548221059088:INFO:9089:ZMQ (client) CAN started.
2020-10-21 15:03:43,003.3.809213638305664:root:548221059088:INFO:9089:ZMQ (client) CAN started.
2020-10-21 15:03:43,035.35.81809997558594:root:548221059088:INFO:9089:ZMQ (client) CAN started.
2020-10-21 15:03:43,059.59.82518196105957:root:548221059088:INFO:9089:ZMQ (client) CAN started.
2020-10-21 15:03:43,072.72.06273078918457:root:548221059088:INFO:9089:ZMQ (server) CAN started.
2020-10-21 15:03:43,079.79.30326461791992:root:548221059088:INFO:9089:PWM Steering started.
2020-10-21 15:03:43,079.79.73003387451172:root:548221059088:INFO:9089:PWM Throttle started.
2020-10-21 15:03:47,051.51.26953125:root:548221059088:INFO:9089:Camera started.

Traceback (most recent call last):
File "src/car.py", line 155, in
main()
File "src/car.py", line 147, in main
car.start()
File "src/car.py", line 125, in start
self._start_component(comp_instance)
File "src/car.py", line 112, in _start_component
long_running = comp_instance.start()
File "/home/jetbot/mycar/src/components/component.py", line 20, in start
raise TypeError("{} - 'start' method not implemented!".format(self))
TypeError: <components.video_recorder.VideoRecorder object at 0x7fa3581a90> - 'start' method not implemented!
Exiting...
Cleaning up pins`

2.网页控制小车反应不灵敏 是都会存在的问题还是我个人遇到的问题呢
3.求解答!谢谢大哥

倒车问题

无论是ServoKit单独控制电机还是通过手柄,倒车命令好像都不太好使。
1.ServoKit单独控制
`from adafruit_servokit import ServoKit
import time
servokit = ServoKit(channels=16, address=0x40)

servokit.continuous_servo[1].throttle = 0.2 # 速度的范围是 -1 ~ 1,大于0表示向前移动,如果输入负数代表后退,注意从前进切换到后退要输入两次同样的负数
time.sleep(2)
servokit.continuous_servo[1].throttle = -0.2
servokit.continuous_servo[1].throttle = -0.2
`
使用上述指令,小车可以前进,但不能后退(偶尔能够后退,但大多数情况都会失败)

2.手柄控制也无法后退

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.