Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[machine pos topic is not updating] #120

Open
wildanxgifari opened this issue Mar 14, 2023 · 4 comments
Open

[machine pos topic is not updating] #120

wildanxgifari opened this issue Mar 14, 2023 · 4 comments

Comments

@wildanxgifari
Copy link

Hi Flynn!

I enjoy your work very much, I use it to control my delta printer via joystick

I want to get feedback for the robot position
however echoing from /cnc_id/machine_position does not output anything

What may cause it to happen?

Thx, Wildan

@github-actions
Copy link

Thank you for creating your first issue on this repo! Give me some time to review and respond to your problem.

@flynneva
Copy link
Owner

Hey @wildanxgifari! Glad you enjoy this package. I'm traveling right now but will look into your issue when I can soon.

@flynneva
Copy link
Owner

@wildanxgifari so this repo I believe uses actions, which feedback on the current position should be sent back to the action caller.

Let me double check that it's functional on my bench and get back to you.

@glass3cat
Copy link

glass3cat commented Sep 15, 2024

I get the position display when I use ros2 topic echo /cnc_001/machine_position in meters.
x-45mm Y45mm
x: -0.045m y: 0.045m

~$ ros2 run grbl_ros grbl_node --ros-args --params-file ~/ros2_ws/src/grbl_ros/config/cnc001.yaml
[INFO] [1726366385.151330662] [grbl_device]: [ ? ] <Idle|MPos:0.000,0.000,0.000,0.000|Bf:15,127|FS:0,0>
[INFO] [1726366671.853200482] [grbl_device]: [ ? ] <Run|MPos:-0.011,0.011,0.000,0.000|Bf:14,127|FS:1018,0|WCO:0.000,0.000,0.000,0.000>
[INFO] [1726366671.873773668] [grbl_device]: [ ? ] <Run|MPos:-0.068,0.068,0.000,0.000|Bf:14,127|FS:1188,0>
[INFO] [1726366671.893868571] [grbl_device]: [ ? ] <Run|MPos:-0.214,0.214,0.000,0.000|Bf:14,127|FS:1527,0>

[INFO] [1726366672.956466212] [grbl_device]: [ ? ] <Run|MPos:-44.820,44.820,0.000,0.000|Bf:15,127|FS:0,0>
[INFO] [1726366672.978406569] [grbl_device]: [ ? ] <Run|MPos:-44.955,44.955,0.000,0.000|Bf:15,127|FS:0,0>
[INFO] [1726366673.002776816] [grbl_device]: [ ? ] <Idle|MPos:-45.000,45.000,0.000,0.000|Bf:15,127|FS:0,0|WCO:0.000,0.000,0.000,0.000>

~$ ros2 action send_goal /cnc_001/send_gcode_cmd grbl_msgs/action/SendGcodeCmd '{command: G0 X-45 Y45}'
Waiting for an action server to become available...
Sending goal:
command: G0 X-45 Y45

Goal accepted with ID: 44e57879ef304fe3943389427a3d8256

Result:
success: true

Goal finished with status: SUCCEEDED

~$ ros2 topic echo /cnc_001/machine_position
position:
x: -0.044988999999999994
y: 0.044988999999999994
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0

position:
x: -0.045
y: 0.045
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants