Bt-410을 이용한 제어기 간 블루투스 연결

Issue:

CM-700 제어기를 2개 활용하여 모션슈트 로봇을 제작하려 합니다. 제어기와 제어기를 무선으로 연결하기 위해 BT-410 모듈을 사용하였습니다. 페어링은 된 것으로 보이나, 실질적으로는 짜놓은 코드가 실행되지 않습니다. BT-410이 제어기끼리도 연결될 수 있는 해결법이나 다른 블루투스 연결방법이 있을까요?


DYNAMIXEL Servo:

AX-12A, RX-24F


DYNAMIXEL Controller:

CM-700


Software Interface:

task 1.0

BT-410 이 페어링된 것 은 어떻게 확인했나요?
한쪽 제어기에서 TxD LED가 깜박일때 반대편 제어기의 RxD가 깜박이는지 확인해보세요.
페이링에 문제가 없다면 제어기코드 문제일 가능성이 높습니다.
보내는 무선데이터와 받는 무선 데이터 처리에 문제가 없는지 점검해보세요.

Adding to Baris’s post which showed you how to use Remocon Packets between CM-700s when TASK codes are being used, there is a peculiar feature of the Firmware on all CM controllers that I don’t know if you are aware of:

  • Let’s say your CM-700s are executing TASK code now, and then they can send each other some REMOCON packets without any problem - as Baris already posted.

  • But as soon as you send into any CM-700 a Dynamixel packet, the currently running TASK will cease execution and the CM-700 puts itself into MANAGE mode. This TASK code is not erased, it is just “ignored”, and you can power the CM-700 off, and upon powering up again, that TASK code will run fine as before.

Was this the situation that you encountered?

BT-410은 정상정으로 페어링되어 지속적으로 LED가 들어와있고 다이나믹셀 구동 이후에도 task mode를 유지합니다. TxD와 RxD 또한 지속적으로 LED가 on 상태를 유지합니다. task코드에서 무선데이터를 따로 설정하는 방법이 있나요?

What do you mean by getting to the wireless data separately from the TASK code? Actually the firmware on the CM-700 allows the functionality of TASK and MOTION including the wireless data. So it is not possible to separate the wireless data from the firmware and thus from TASK.

Perhaps can you share the reasons why do you need 2 separate CM-700s?

Maybe you can use one CM-700 and one OpenCM-904 or OpenRB-150 on Arduino?

원격 모션슈트를 제작함에 있어서 제가 착용할 입력부에 cm-700이 1개 필요하고, 먼 거리에서 존재해야 하는 출력부에도 cm-700이 1개 필요합니다. Cm-700을 아두이노와 연결할 수 있나요? 아니라면 OpenCM-904 또는 OpenRB-150을 사용하여 제어기간 블루투스 연결을 할 수 있는 방법이 존재한가요?

Let’s see if I understand your setup correctly.

You have two CM-700s that you use at the same time - let’s call them CM-700-1 and CM-700-2. CM-700-1 is the one that you wear on your body, this CM-700-1 probably has special sensors to monitor your body motion. When it is appropriate, the CM-700-1 sends specific commands via Remocon Packets through the BT-410s to the CM-700-2 which is the “actual” robot performing the required DXL operations.

If this is the case, your current approach using two CM-700 should work. I had done similar projects using two CM-530s running on TASK programs whereas I embedded multiple pieces of information such as DXL ID and Goal Position values inside the 16-bit Remocon packet. You can see some demo videos here:

The actual explanations of the techniques are in this book:

If you so wish, you can also use the OpenRB-150 (or other Arduino boards for wearable devices) running on Arduino to handle your special sensors, and then you can prepare your OWN Remocon packets to send to your CM-700-2 also, because the exact protocol of a Remocon Packet is spelled out at this link.

도움을 주셔서 정말 감사합니다!! 이해하신 내용이 정확하게 일치합니다. 다만 리모콘 패킷을 이용한다는 것을 잘 이해하지 못하겠습니다. 영상 속 내용에 대한 조금 더 자세한 설명을 부탁드려도 될까요? 또한 task 프로그램의 예시도 보고 싶습니다. 많은 부탁을 드려 죄송합니다. 정말 감사합니다!!

First , you need to understand the Remocon Packet very well by reading that previous ROBOTIS e-manual link carefully. ROBOTIS originally created the Remocon Packet to handle the 10 buttons of the RC-100, so they used the first 10 bits only in their example TASK codes. Their REMOCON packet actually has room for 16 bits of data, so this gives you lots of freedom in shaping the 16 bits to include information that you want to send from a TASK program to another TASK program.

Second, you need to work with BIT-AND & BIT-OR operations on this 16 bits data chunk. If you have not done this before, you’ll need to learn it to understand my example codes. This kind of information is available all over the web.

Third, Springer has the copyrights for that book, so you can visit your local University library, they probably has a hard copy or an e-book version of it that you can read about. However they do post a free copy of my example codes at this link (Extra Materials Archive Search).

설명해주셔서 감사하지만, 죄송스럽게도 잘 이해가 되지 않습니다. Robotis에는 이번에 입문했고, 전공적인 지식도 부족합니다. 우선 설명해주신 내용에 대해서 일단은 더 공부해보겠습니다.

  1. e-manual을 읽어봤지만 Remocon packet을 task 프로그램에 적용하는 방법을 모르겠습니다. RB-100을 cm-700과 연결해야 하나요? 아니면 이해한 내용을 토대로 응용해야 하나요? task 프로그램 뿐만아니라 외부에서 제어기를 어떻게 연결해야 할지도 모르겠습니다.

  2. BIT-AND, BIT-OR 연산을 어떻게 수행해야 하나요? 이 연산이 무엇을 의미하는지는 알고 있습니다. 하지만 이를 어디에서 활용하는지를 모르겠습니다.

  3. 보내주신 링크에 들어가 파일을 다운로드 받아봤지만, 어떤 것이 예제 코드인지 잘 알 수 없습니다. Extras Archive File에서 어떠한 경로로 들어가면 코드를 볼 수 있는 건가요?

Look for “CM5XX-MimicGripperL_OpenLoop.tsk” and “CM5XX-MimicGripperF_OpenLoop.tsk”, and MOTION files (“BasicGripper16.mtn” and “BasicGripper17. mtn”) and watch the video file “Video 7.3” for demonstration purposes.

Look for “CM5XX-MimicGripperL_ClosedLoop.tsk” and “CM5XX- MimicGripperF_
ClosedLoop.tsk” and watch the video file “Video 7.4” for demonstration purposes.

Look for “Gerwalk_L_ClosedLoop.tsk” and “Gerwalk_F_ClosedLoop.tsk” and “GerwalkDemoMotion.mtn” files and the video file “Video 7.5” for demonstration purposes.

비디오 파일은 어디에 가면 볼 수 있나요? 다른 파일들은 모두 찾았지만 비디오 파일은 보이지 않습니다.

I already posted the Youtube video links in a previous post.

You have to click on the links to take you directly to the actual YouTube website to see the videos.

rx.tsk|attachment (3.0 KB)
_tx.tsk (3.1 KB)

위 코드 참고해보세요.
제어가 두개에 각각 다운받아야합니다. 리모컨 패킷 처리하는부분 위주로 보시고, ID나 위치값은 로봇마다 다를테니 직접 구현해야합니다.

프로그램을 이해하고 패킷 처리하는 부분을 통해 직접 실행도 해보았는데 프로그램이 제대로 구현되지 않습니다. 혹시 제어기끼리 연결할 때 bt-410 블루투스 모듈을 사용하는 것이 아니라 다른 방법을 사용해야 하나요? bt-410으로 가능하다면 무엇이 문제일까요?

The process used is independent of the BT hardware used. You should try out the mimicking One servo example first to serve as a reference point to troubleshoot from.
Baris example is simpler. Have you tried it?

네, task 코드를 작성하여 각각 1개의 서보모터만 작동시켜봤지만 영상과 같이 이상한 동작을 한 후 멈춰버립니다. BT 하드웨어와 독립적이라는 것은 무슨 뜻인가요?

하드웨어적으로는 올바른 연결과 세팅인가요?

The hardware setup looks OK.

My original codes assume that ZigBee modules are used, as you are using BT, you need to disable all “Remocon ID” statements that relate to ZigBee such as the one below:

image