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

[WIP] Update Dynpick QNX driver for dual-arm HiroNXO #479

Open
wants to merge 2 commits into
base: indigo-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions hironx_ros_bridge/robot/dynpick/dynpick_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,13 @@ int main(int argc, char **argv) {
#ifdef __QNX__
slogf(0, _SLOG_INFO, "Started fd1 = %d, fd2 = %d\n", fd1, fd2);
#endif
SetComAttr(fd1);
/* Switch the order of SetComAttr depending on your sensor. Also alter the order at ReadCom calls later in this file. */
// serusb1=right, serusb2=left
//SetComAttr(fd1);
//SetComAttr(fd2);
// serusb2=right, serusb1=left
SetComAttr(fd2);
SetComAttr(fd1);

/* Create the Dispatch Interface */
dpp = dispatch_create();
Expand Down Expand Up @@ -364,8 +369,12 @@ int main(int argc, char **argv) {
/* The "Data Pump" - get and process messages */
while (1) {
/* do serial read */
ReadCom(fd1, force_sensor_data_0);
ReadCom(fd2, force_sensor_data_1);
// serusb1=right, serusb2=left
//ReadCom(fd1, force_sensor_data_0);
//ReadCom(fd2, force_sensor_data_1);
// serusb2=right, serusb1=left
ReadCom(fd2, force_sensor_data_0);
ReadCom(fd1, force_sensor_data_1);

printf("dispatch\n");
/* process message */
Expand Down
11 changes: 6 additions & 5 deletions hironx_ros_bridge/robot/dynpick/run_dynpick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@

# Written by TORK

# slay devc-serusb
# sleep 1
slay -f devc-serusb
sleep 3
## devc-serusb needs to be that of QNX6.5.0 SP1, to recognize Dynpick WDF-6M200-3, which is USB-Serial with 921.6kbps.
## And looks like we don't need to specifically call it as long as right version of /sbin/devc-serusb is placed.
# devc-serusb -E -F -b 921600 -d busno=0,devno=1,vid=0x10c4,did=0xea60
# sleep 1
# stty < /dev/serusb1
devc-serusb -E -F -b 921600 -d busno=4,devno=2,unit=1,vid=0x10c4,did=0xea60
devc-serusb -E -F -b 921600 -d busno=4,devno=3,unit=2,vid=0x10c4,did=0xea60
sleep 3
# stty < /dev/serusb1
./dynpick_driver &
# stty < /dev/serusb1