teleop keyboard issue #370
Unanswered
AlEXANDER9901
asked this question in
Q&A
Replies: 1 comment 6 replies
-
Hi! In the teleop launch file there is also an crazyflie name you need to define, like cf1 or cf231. This exact thing hit me yesterday and I even wrote the darn script 😜. Let me know if that works! |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I didn't find any discussions on teleop_keyboard, so I'm asking here again. I'd really appreciate your help. First, let me explain the issue. We're currently trying to control a Crazyflie using the keyboard. After running ros2 run teleop_twist_keyboard teleop_twist_keyboard and experimenting, we found that besides 't' (up) and 'b' (down), other keys like 'u', 'i', 'o', etc., don't move the Crazyflie, and no error is displayed. I'll describe the categories of the problem I've considered:
rqt_graph Connection:
![1117rqt](https://private-user-images.githubusercontent.com/125459416/283703516-abaac5bc-bfb8-4392-b71e-9da7a0dc0ee6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjU3NjgsIm5iZiI6MTczOTU2NTQ2OCwicGF0aCI6Ii8xMjU0NTk0MTYvMjgzNzAzNTE2LWFiYWFjNWJjLWJmYjgtNDM5Mi1iNzFlLTlkYTdhMGRjMGVlNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQyMDM3NDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yNTYzNmRjMDJhODdjOWM1ZDdhOTRiZWIwNGFiMzg5MmNiNzVjYzAzMTAxNmQwYTczYTZjZDY4MmVjNDE1ODk5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.cLxnLKOvs8wCo_WvvhXPClOPwpgBgo37UBuSFvIldkM)
Looking at the rqt_graph image, it seems that the /vel_mux node is not connected to the Crazyflie. I wondered if this might be the reason.
Controller Configuration in crazyflie_yaml:
I changed the controller to 1 (PID) in crazyflie_yaml, but there was no change. Could it be because firmwar_logging is set to false?
Topic /cmd_vel Information:
![cmdvel](https://private-user-images.githubusercontent.com/125459416/283703536-a3171131-4ecb-45d1-84e5-25d075603241.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjU3NjgsIm5iZiI6MTczOTU2NTQ2OCwicGF0aCI6Ii8xMjU0NTk0MTYvMjgzNzAzNTM2LWEzMTcxMTMxLTRlY2ItNDVkMS04NGU1LTI1ZDA3NTYwMzI0MS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQyMDM3NDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MWJiY2E4ODc4NDE0NDEyZmIzNGE1MDA5YTU4ZjM1NDc0OTY5NTYyY2MyNjUxMTdkYzkzYzViNmMwNTg5MWZiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.pF7JqtBMCx8hi5awuPyxEexDxSGXM3VPPNQy_B_i-YI)
When checking ros2 topic info /cmd_vel, it looks similar to the image. I'm curious if the Subscription count should be 2.
ros2 echo /cmd_vel:
![스크린샷, 2023-11-17 15-21-28](https://private-user-images.githubusercontent.com/125459416/283703664-2b104170-41b6-452a-8c53-e82d6f90dce8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjU3NjgsIm5iZiI6MTczOTU2NTQ2OCwicGF0aCI6Ii8xMjU0NTk0MTYvMjgzNzAzNjY0LTJiMTA0MTcwLTQxYjYtNDUyYS04YzUzLWU4MmQ2ZjkwZGNlOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNFQyMDM3NDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MWJhMzRiYzEyNGI5ZWRhOWRjMDNhMTE2OWI4N2UyMzc4YmQ5NTI4Y2RkNGJjODZkMmYyZGE4M2UzM2M2YTcyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.6oJ8xZ8k-384Htcs2TqyPRQeCHiV5jBa6RHtepX4eqI)
When doing ros2 echo /cmd_vel, values appear when pressing keys like 'u', 'i', etc. I'm thinking it might indicate that the keyboard commands are not properly connected to the Crazyflie since 't' and 'b' work, but the other keys don't.
I hope this clarifies the situation. Any insights into why the other keys might not be functioning would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions