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

Not really an issue. Can I substitute a Pi4 for the NUC? If yes, what would that require? #105

Open
Smitty-44 opened this issue Dec 2, 2020 · 21 comments

Comments

@Smitty-44
Copy link

I am creating my own biped (26 DOF) which in many ways is similar to the OP3.
But, I have a Pi4 instead of a NUC. And I have a rplidar.
The Pi4 has Raspian installed and ROS melodic.
I have the Pi4 directly connected (usb) to a OpenCR.
I downloaded the OP3 code to the Pi4 workspace, and catkin_make just fine.
Using my windows desktop, I compiled, and successfully uploaded the OP3 code for the OpenCR.
I changed a number of modules/files (op3_bringup.launch, op3_manager.launch, offset.yaml, OP3.robot, dxl_init_OP3.yaml, etc.).
To simplify things, the first 20 motors of my biped match the location and name of the OP3 motors.
In this way, I only needed to add the extra 6.
I am using XM430-210-T(s) in the legs and torso, and XL430-250-T(s) for the arms).
Baud rates set at 2M.
I am using the 12V power supply and I know the dynamixels are getting power due to the leds flashing once.
In a Pi terminal, I type in (fyi, I'm using ttyUSB0 for the rplidar which works fine):
$ export OPENCR_MODEL=OP3
$ OPENCR_PORT=/dev/ttyACM0
$ sudo chmod 666 /dev/ttyACM0
During roslaunch op3_bringup, it is apparent the Pi4 and OpenCR are not communicating as planned. I'm getting the errors as described here: https://github.com/ROBOTIS-GIT/ROBOTIS-OP3/issues/50

[ERROR] [1532100652.759606870]: Torque on DXLs! [[RxPacketError] Unknown error code!]
[ERROR] [1532100652.895751751]: Fail to control LED [[RxPacketError] Unknown error code!]
...and...
[ERROR] [1532100655.314481806]: [RobotisController] first bulk read fail!!
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::lock_error >'

How would I setup the WiFi Hotspot on a Pi4? emanual.robotis.com/docs/en/platform/op3/recovery/#pc-setting

Would any of the setup procedures or software for turtlebot3 help in this matter?
I didn't try any of that up to this moment due to mixing and matching those two software.
I didn't want to create a much worse problem and maybe having to start over.
As a sidenote, I am able to SSH into the Pi4 from my windows desktop so I can control from there and also use SLAM for the lidar.
Any help or direction would be appreciated.
Thank you very much in advance, Jay

@ROBOTIS-Will
Copy link

Hi,

OpenCR for OP3 requires a special firmware that communicates between PC and DYNAMIXEL.
This firmware can be uploaded from Arduino IDE.
Install OpenCR Board manager in Arduino IDE and upload OpenCR > OP3 > opencr_op3 sketch.
Please note that OpenCR does not support Arduino IDE on Raspberry Pi, so use PC or laptop to upload the firmware.

The OpenCR USB port for Raspberry Pi is configured as below in TurtleBot3.
Copy 99-turtlebot3-cdc.rules file into /etc/udev/rules.d/ directory.
Then run below commands.

$ sudo udevadm control --reload-rules
$ sudo udevadm trigger

For setting up the Raspberry Pi hotspot, you'll need to search for Raspberry Pi forum as we do not provide tech support on a third party products.

If you are planning to add a camera, Raspberry Pi 4 may not be a feasible solution as vision processing requires quite a lot of processing power and OP3 is designed for processing without an external PC.
In that case, you might want to try something like NVidia Jetson Nano, but take my word with a grain of salt as I don't have complete understanding on your project.
Thank you.

@Smitty-44
Copy link
Author

Will Son, thank you so much for your quick reply.
I had already done the first section of uploading the opencr_op3 sketch.

I just performed the second section with copying the 99-turtlebot3-cdc.rules file and running those specified commands.

Still the exact same result when issuing: $ roslaunch op3_bringup op3_bringup.launch.

I will go ahead and look for a Raspberry Pi forum for the hotspot direction.
At this moment I do not have a camera, just an rplidar.

Thanks again for your quick response, Jay

@ROBOTIS-Will
Copy link

Hi Jay,
Did you connect the U2D2 to the Raspberry Pi?
OP3 uses U2D2 to communicate with DYNAMIXEL while OpenCR provides power and IMU data.
Since your RPLIDAR is connected to ttyUSB0, you'll need to modify the op3_manager.launch in the op3_manager package so that correct port name is assigned to the U2D2 (by default, ttyUSB0 is assigned in the launch file).
Thanks.

@Smitty-44
Copy link
Author

Smitty-44 commented Dec 8, 2020 via email

@ROBOTIS-Will
Copy link

Hi Jay,
The proper hardware configuration can be found from the OP3 eManual.
U2D2 will be using ttyUSB0 port while OpenCR will be assigned to ttyACM0 on RPi.

@Smitty-44
Copy link
Author

Smitty-44 commented Dec 10, 2020 via email

@ROBOTIS-Will
Copy link

The DYNAMIXEL power line of the OpenCR is controlled with an FET which is electronically controlled with a digital signal from MCU.
In order to turn on this FET and supply power to DYNAMIXEL, OpenCR should be properly connected to the controller(Intel NUC in case of OP3), and once the connection is properly made, the op3_manager will try to turn on this FET as shown in the code below.
https://github.com/ROBOTIS-GIT/ROBOTIS-OP3/blob/master/op3_manager/src/op3_manager.cpp#L183

@Smitty-44
Copy link
Author

Smitty-44 commented Dec 11, 2020 via email

@ROBOTIS-Will
Copy link

Hi Jay,
Thank you for the updates and glad that all DYNAMIXEL are getting powered.
Every DYNAMIXEL should blink once when powered, and if you didn't see them blinking, there must be something wrong.
The DYNAMIXEL will be powered while launching the op3_manager.
Keep it up and wish the best for you!

@Smitty-44
Copy link
Author

Smitty-44 commented Dec 17, 2020 via email

@ROBOTIS-Will
Copy link

Hi, @Smitty-44
RS-485 DYNAMIXEL can be replaced with TTL DYNAMIXEL without any modification in the code as long as you are sticking to one communication type.
Looks like your scan from the rplidar cannot be transformed. Make sure you have correctly modified the URDF and tf tree shows the connection properly.
These modifications, unfortunately can not be supported from our side as it exceeds the boundary of our technical support for the official platform.
I'd recommend to use ROS2 Answers forum where many experienced developers hang out and you may find similar cases.
Thank you.

@Smitty-44
Copy link
Author

Smitty-44 commented Jan 25, 2021 via email

@ROBOTIS-Will
Copy link

Hi Jay,

I hope you too had a great holiday and beginning of the new year!

OP3 is designed with OpenCR to provide sufficient power for operation.
If you are having a voltage drop issue, please check if your electrical system can provide sufficient power.
When connecting multiple DYNAMIXELs, it is recommended to directly connect to the power source, but please be aware of the operating voltage of DYNAMIXEL.
Depending on your robot design, you should also revise the electrical configuration based on your requirement so that voltage drop would not occur.

Thank you.

@Smitty-44
Copy link
Author

Smitty-44 commented Jan 26, 2021 via email

@ROBOTIS-Will
Copy link

Jay,

It seems like pictures and video are not properly attached in the thread.
The ROBOTIS 12V SMPS is limited to 5A supply and connecting 26 DYNAMIXEL may need much more juice than that.
Also please note that the SMPS barrel jack is somewhat inconsistently contacting to the connector while the robot is moving, so it is recommended to connect the LiPo battery to OpenCR even if SMPS is providing power to the robot.

The best option will be supplying power directly from 11.1V LiPo battery so that you don't have to worry about voltage drop.
I'm still unsure what exactly causes the OpenCR reset, but I'm suspecting the power source.

Please generously understand that I cannot thoroughly review on your personal project based on our OP3 unless the technical support on customer's project is officially requested via contactus2@robotis.com.

Thank you.

@Smitty-44
Copy link
Author

Smitty-44 commented Feb 8, 2021 via email

@ROBOTIS-Will
Copy link

Jay,

Appreciate your understandings and updates on your project progress.
As you are developing a OP3 like humanoid, marketing team may also have an interest in your project.
If you are posting your project on a specific channel, we are happy to help spreading the words for your project :)
Happy developing and stay safe!

@bryntirion2
Copy link

The RPI 4 is great for OP2 and I assume OP3 as well.
No problems with processing power, I can have a live feed from the camera and display all my visual diagnostics created with opencv and only use 30% CPU.

The NUC weighs far too much for such a small biped, a CM740 and the Pi is the way to go.

https://www.youtube.com/watch?v=40ikFDVgt7s&t=91s

M

@ROBOTIS-Will
Copy link

@bryntirion2
Thanks for the udpates.
You're right, the NUC is getting heavier for a small sized humanoid and SBC could be a good substitute for it.
Are you running the robot on ROS1 Kinetic?

@shiba-8ro
Copy link

Japanese ROBOTIS competitor (non-Dynamixel Humanoid) is RasPi4 + ROS 1 Melodic.
They looks closed source. They don't seem to have a Github organization or repository.
For reference.
https://youtu.be/ayo-KIgPp14

@ROBOTIS-Will
Copy link

@ROBOTIS-Shibata
Here's another example of running humanoid with RPi + ROS.
The ROS code has not been shared though.
https://www.youtube.com/watch?v=57VoKIGZx9w

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

4 participants