René's URL Explorer Experiment


Title: 线性化 · Issue #3 · TinyMPC/tinympc-python · GitHub

Open Graph Title: 线性化 · Issue #3 · TinyMPC/tinympc-python

X Title: 线性化 · Issue #3 · TinyMPC/tinympc-python

Description: 你好,我在作者给的非线性动力学模型 线性化 案例中,按照给的代码,运行总是会出现类型不匹配的错误,运行了作者的代码也是同样的问题,请问是为什么呢 作者代码如下: mc = 0.2 # mass of the cart (kg) mp = 0.1 # mass of the pole (kg) ℓ = 0.5 # distance to the center of mass (meters) g = 9.81 def cartpole_dynamics(x, u): r ...

Open Graph Description: 你好,我在作者给的非线性动力学模型 线性化 案例中,按照给的代码,运行总是会出现类型不匹配的错误,运行了作者的代码也是同样的问题,请问是为什么呢 作者代码如下: mc = 0.2 # mass of the cart (kg) mp = 0.1 # mass of the pole (kg) ℓ = 0.5 # distance to the center of mass (meters) ...

X Description: 你好,我在作者给的非线性动力学模型 线性化 案例中,按照给的代码,运行总是会出现类型不匹配的错误,运行了作者的代码也是同样的问题,请问是为什么呢 作者代码如下: mc = 0.2 # mass of the cart (kg) mp = 0.1 # mass of the pole (kg) ℓ = 0.5 # distance to the center of mass (meters) ...

Opengraph URL: https://github.com/TinyMPC/tinympc-python/issues/3

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"线性化","articleBody":"你好,我在作者给的非线性动力学模型 线性化 案例中,按照给的代码,运行总是会出现类型不匹配的错误,运行了作者的代码也是同样的问题,请问是为什么呢\r\n作者代码如下:\r\nmc = 0.2 # mass of the cart (kg)\r\nmp = 0.1 # mass of the pole (kg)\r\nℓ = 0.5 # distance to the center of mass (meters)\r\ng = 9.81\r\n# \r\n\r\ndef cartpole_dynamics(x, u):\r\n    r       = x[0] # cart position\r\n    theta   = x[1] # pole angle\r\n    rd      = x[2] # change in cart position\r\n    theta_d = x[3] # change in pole angle\r\n    F       = u[0] # force applied to cart\r\n\r\n#问题出现处,显示np.sin(theta)中的theta不符合数据要求\r\n    theta_dd = (g*np.sin(theta) + np.cos(theta) * ((-F - mp*l*(theta_d**2) * \\\r\n                    np.sin(theta))/(mc + mp))) / (l*(4/3 - (mp*(np.cos(theta)**2))/(mc + mp)))\r\n    rdd = (F + mp*l*((theta_d**2)*np.sin(theta) - theta_dd*np.cos(theta))) / (mc + mp)\r\n\r\n    return np.array([rd, theta_d, rdd, theta_dd])\r\ndef cartpole_rk4(x, u, dt):\r\n    f1 = dt*cartpole_dynamics(x, u)\r\n    f2 = dt*cartpole_dynamics(x + f1/2, u)\r\n    f3 = dt*cartpole_dynamics(x + f2/2, u)\r\n    f4 = dt*cartpole_dynamics(x + f3, u)\r\n    return x + (1/6)*(f1 + 2*f2 + 2*f3 + f4)\r\nimport autograd as AG\r\n\r\nxgoal = np.array([0.0, np.pi, 0.0, 0.0])\r\nugoal = np.array([0.0])\r\n\r\ndt = 0.01\r\n\r\nA = AG.jacobian(lambda x_: cartpole_rk4(x_, ugoal))(xgoal)\r\nB = AG.jacobian(lambda u_: cartpole_rk4(xgoal, u_))(ugoal)","author":{"url":"https://github.com/fly-daiuser","@type":"Person","name":"fly-daiuser"},"datePublished":"2024-09-29T14:47:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/3/tinympc-python/issues/3"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c362c385-952c-747e-374a-6c9a57e89989
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC882:6A3E9:150D8C4:1D7996E:69821B89
html-safe-noncead655003d5fd76e94178a5f26193b09926f63482b1cbd875fe228d5c6f7fdb38
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODgyOjZBM0U5OjE1MEQ4QzQ6MUQ3OTk2RTo2OTgyMUI4OSIsInZpc2l0b3JfaWQiOiIxOTcxMTUyODM1NDI0OTUxMTc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac88382b28e45413cb7a52c47a7ed816db38303ed57e6a0839b58a32ca5bcd2813
hovercard-subject-tagissue:2554971561
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TinyMPC/tinympc-python/3/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7b8b010a8b343be786ace928797663d9a554993a319ed62e056a102c756c10c2/TinyMPC/tinympc-python/issues/3
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7b8b010a8b343be786ace928797663d9a554993a319ed62e056a102c756c10c2/TinyMPC/tinympc-python/issues/3
og:image:alt你好,我在作者给的非线性动力学模型 线性化 案例中,按照给的代码,运行总是会出现类型不匹配的错误,运行了作者的代码也是同样的问题,请问是为什么呢 作者代码如下: mc = 0.2 # mass of the cart (kg) mp = 0.1 # mass of the pole (kg) ℓ = 0.5 # distance to the center of mass (meters) ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefly-daiuser
hostnamegithub.com
expected-hostnamegithub.com
Nonec5d01132ac10b0b45b88f4c1c8790502d669eb065ff383dc5e4757c174f3380f
turbo-cache-controlno-preview
go-importgithub.com/TinyMPC/tinympc-python git https://github.com/TinyMPC/tinympc-python.git
octolytics-dimension-user_id115185965
octolytics-dimension-user_loginTinyMPC
octolytics-dimension-repository_id716276129
octolytics-dimension-repository_nwoTinyMPC/tinympc-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id716276129
octolytics-dimension-repository_network_root_nwoTinyMPC/tinympc-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0ac87bbde7c9f04b7ead5505c12f56048d89df09
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/issues/3#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FTinyMPC%2Ftinympc-python%2Fissues%2F3
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FTinyMPC%2Ftinympc-python%2Fissues%2F3
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=TinyMPC%2Ftinympc-python
Reloadhttps://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/issues/3
Reloadhttps://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/issues/3
Reloadhttps://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/issues/3
TinyMPC https://patch-diff.githubusercontent.com/TinyMPC
tinympc-pythonhttps://patch-diff.githubusercontent.com/TinyMPC/tinympc-python
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FTinyMPC%2Ftinympc-python
Fork 13 https://patch-diff.githubusercontent.com/login?return_to=%2FTinyMPC%2Ftinympc-python
Star 34 https://patch-diff.githubusercontent.com/login?return_to=%2FTinyMPC%2Ftinympc-python
Code https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python
Issues 4 https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/issues
Pull requests 1 https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/pulls
Actions https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/actions
Projects 0 https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/projects
Security 0 https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/security
Insights https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/pulse
Code https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python
Issues https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/issues
Pull requests https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/pulls
Actions https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/actions
Projects https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/projects
Security https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/security
Insights https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/TinyMPC/tinympc-python/issues/3
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/TinyMPC/tinympc-python/issues/3
线性化https://patch-diff.githubusercontent.com/TinyMPC/tinympc-python/issues/3#top
https://github.com/fly-daiuser
https://github.com/fly-daiuser
fly-daiuserhttps://github.com/fly-daiuser
on Sep 29, 2024https://github.com/TinyMPC/tinympc-python/issues/3#issue-2554971561
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.