execute ros functions inside a python file
im trying to pub a nav2_goal under a pyhon file inside if statement
how i can publish that.
Asked by iimata on 2022-08-07 17:23:53 UTC
im trying to pub a nav2_goal under a pyhon file inside if statement
how i can publish that.
Asked by iimata on 2022-08-07 17:23:53 UTC
Comments
I strongly recommend mentioning your code to understand the problem better.
Asked by ravijoshi on 2022-08-07 21:25:43 UTC
i have this code when the camera detect a person i need to publish a nav2_goal
Asked by iimata on 2022-08-08 09:25:19 UTC
this is my goal that i need to publish
ros2 topic pub /goal_pose geometry_msgs/PoseStamped "{header: {stamp: {sec: 0}, frame_id: 'map'}, pose: {position: {x: 5.0, y: -2.0, z: 0.0}, orientation: {w: 1.0}}}"
Asked by iimata on 2022-08-08 09:27:41 UTC
Two things. 1) Please format your code properly and then move it from comment section to question. 2) "i need to publish", please look at the ROS tutorial page titled "Writing a Simple Publisher and Subscriber (Python)". It is beautifully written with complete explanation.
Asked by ravijoshi on 2022-08-08 21:32:35 UTC
Thanks alot Ravi <3
Asked by iimata on 2022-08-08 22:49:45 UTC