how do you send publish to specific joint using python3?
In my terminal, it looks like this:
bwuk@robots:~/my_robot/my_robot_description$ ros2 topic echo /joint_states
header:
stamp:
sec: 1629536818
nanosec: 633569535
frame_id: ''
name:
- joint_rear_left_wheel
- joint_rear_right_wheel
- joint_front_right_wheel
- joint_front_left_wheel
- head_attach
- head_attach2
position:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
velocity: []
effort: []
---
header:
stamp:
sec: 1629536818
nanosec: 656484369
frame_id: ''
name:
- joint_rear_left_wheel
- joint_rear_right_wheel
- joint_front_right_wheel
- joint_front_left_wheel
- head_attach
- head_attach2
position:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
velocity: []
effort: []
---
As you can see that jointstates has 6 joints inside. How do I run each joint inside the /jointstates?
I wanted to send like, for example, 5 m/s velocity to jointfrontleft_wheel only so it can move in gazebo/rviz2.
How do I do that in python3?
Keywords: Foxy ubuntu 20.04 ros2 python python3 publisher joint one wheel single
Asked by kak13 on 2021-08-21 04:11:44 UTC
Comments
I'm sorry to have to do this for something so seemingly unimportant, but please don't post screenshots of terminal text in question on ROS Answers. It's all text, so there is no need. Just copy-paste the text from the terminal into your question text. Do make sure to format it properly by selecting the text and pressing
ctrl+k(or clicking the Preformatted Text button (the one with101010on it)).You don't need to post a new question, just edit your curent one. You can use the
editbutton/link for this.After you replace the screenshot with the error message itself, we can re-open your question.
Asked by gvdhoorn on 2021-08-21 04:20:39 UTC
Understood! I will do it from now on. Thanks!
Fixed :D
Asked by kak13 on 2021-08-21 04:22:29 UTC