-
Notifications
You must be signed in to change notification settings - Fork 1
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
Mo prim testing #3
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latch parameter works amazingly! Thanks for solving that! Just left a few small comments, mainly just to improve readability.
@@ -0,0 +1,44 @@ | |||
""" | |||
This currently does NOT work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update this comment :)
# send at least 2. | ||
N = 1 | ||
print("************** N =", N) | ||
for i in range(N): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind removing the loop for readability?
for i in range(N): | ||
# default RESET angle [0., -0.34, 0., -1.66, 0., 1.32, 0.8] | ||
|
||
test_pose = [0., -0.3, 0., -1.66, 0., 1.32, 0.8] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason there is 2 of these?
@@ -0,0 +1,56 @@ | |||
""" | |||
This currently does NOT work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update this comment :)
|
||
|
||
def test_reset(): | ||
pub = rospy.Publisher('/parser/command', Command, queue_size=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This currently doesn't move the bot since it doesn't have the latch parameter.
|
||
# For some reason, a single message does not go through so need to | ||
# send at least 2. | ||
for i in range(1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the loop for readability?
poses.poses = [p0 ] # Home position | ||
|
||
action = Action(type=Action.RESET, # RESET | ||
poses=poses, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command doesn't need any poses so I would just remove this and lines 20-35.
Add test_move_angle.py
Add test_reset.py
Solve "publish at least twice" problem in test_move_angle.py by adding
latch=True
option in published in test_move_angle.pyExplain:
I use
rostopic echo /parser/command
to monitor what is being published in our test file and find that if publish once, nothing is published. So the problem comes from command publisher in our test file. The latch option will make sure publishing successfully.From ROS wiki: