ROS Bridge Server - ros

I am an intern in charge of improving the gazebo simulation for my internship. Currently, I managed to successfully drive my virtual buggy in the gazebo world smoothly as shown in the video link.
https://youtu.be/uS5PXshZZTU
Right now, I am tasked by my supervisor to connect my virtual buggy's movements to the movement of the real buggy that we have, so for example, when the real buggy moves 1 metre, the virtual buggy also moves 1 metre in its virtual world. I was told to use ROS Bridge Server to do this task but I do not have an idea on how to start this task at all. So I would appreciate it if someone who is knowledgable in this area help me out.

Mostly, it is really simple to change from simulation to real world application. The most ROS driver for robots have the roslaunch flag simulation and setting it on false causes ROS to launch the real controllers to.
I do not know if you created your gazebo package from scratch but if not there must be a possibility to launch the launch file with a sim:=false flag. Look into thr rviz support and in the demo.launch file.

Related

Raspberrry Pi 3 + Windows IOT Core crashes after some time

Im developing an uwp app on Raspberry Pi 3 with Windows IOT Core. But after I deploy my app and use it for couple days the os crashes. It says something went wrong. It says "Your pc ran into a problem and needs to restart". It restarts couple times but still same error on every boot.
I tried to remove the sd card(Class 10,64 GB) format it and reinstall everything. At first it was okay but after some time same error appears.
I tried to use different os builds and it didnt work.
I tried to use industrial power supply (5V3A) and also it didnt work.
My SD Card is not one of the recommended ones but do I really have to get the recommended sd cards to use the windows iot core properly?
"Your PC ran into a problem and needs to restart" is a typical blue screen message seen on Windows systems from the last few years - laptops and desktops with far larger hard drives and no SD card. The error is not associated with a RAM or disk space shortage (operating systems running in graphical mode usually monitor and actively warn about either). In your case, it is showing at startup, when not much is running (taking up RAM), and you can check the amount of space used on the card with the PC.
The key stats for SD cards are size (you have plenty) and speed (clearly enough or you would have trouble installing/running anything after starting the Pi). The cause is something else, and finding out what will require getting a more detailed error message from Windows - "a problem" could mean anything. In my experience, blue screen errors have mostly involved having a wrong driver installed, sometimes a bad Windows update - but IoT Core has its own alternatives, like "bad system configuration". Look for the underscored string (e.g., BAD_SYSTEM_CONFIG_INFO) at the end of your blue screen message, as that is the first hint.
Unfortunately, most Windows BSoD documentation is for traditional PCs, so I cannot recommend specific troubleshooting tools and be sure that they will run on the Pi.
You can use Windows Debugger to debug the kernel and drivers on Windows IoT Core. WinDbg is a very powerful debugger that most Windows developers are familiar with. Or you can also refer to this topic in MSDN, it shows how to create the dump file when the app crashes. If possible, you can share your code so that we can reproduce the issue.

Safety in controlling the drone dji m100 with raspberry and ROS

I have a question regarding the safety of the raspberry usage to control the drone m100.
I wrote a simple program in c++ for the takeoff and landing of the drone m100. I want to execute this program on the real drone using ROS. Therefore I put this program on the raspberry (along with the dji libraries) and via ssh i can execute it and control the drone. But if someone goes wrong during the execution, can the user regain the control of the drone using the remote controller?
In our experience, if something goes wrong, you should be able to move the switch on the controller to 'P' and get control of the drone.

Windows 10 IoT - Raspberry pi 2

I have to build a rover which has a camera on it and through webcam samples i am able to view the preview of it. I also came up with another app with has controls for the rover's motors. It works fine when i connect this device to a monitor and work with it, but for my purpose it needs to be headless. Is there any way i could remotely access the application. I am stuck up with so many different solutions like duplicating the entire project as webpage or could open the same application is the development machine that they communicate with each other. All i have to do is remotely control the rover with a video preview and even lower fps is acceptable.
There are a lot of ways to do this. (As #BerndGit implies.)
The easiest (IMHO) is to SSH in to the RPi from another computer and forward X11. That second computer will need to be configured for accepting X11 sessions.
Look for "SSH X11 Display Forwarding" for details on how to make this work on your setup.

How does a wdf driver handle device's re-power-on event?

I've taken over the maintenance job of a device driver from another guy recently.
The driver works with a pci-e board. when the system starts up, the driver will allocate a 128Mb memory, and then set some registers on the board to pass the information about the allocated memory. Later when the board is working, it will write some data to the memory and some other application will access those data through the driver.
The board is powered by a standalone adapter (not powered by pci-e slot, it's a demo or development board). So when sometimes the fpga program in the board goes wrong, we will re-powered on the board (this is fast) and restarted the pc also (this is slow, otherwise the board will know nothing about the driver-allocated memory).
Here comes my problem: is it possbile for driver to know the board has been re-powered on? if it can detect the event and do something like those done when the system starts up, it will save us much time.
I haven't got much knowledge about driver development before, it would be helpful if there is any not-too-complicated tutorial/article for this kind of job. Or maybe I must find some thick books to learn from scratch?
Hope I've made myself understood and any suggestions would be greatly appreciated:-)
Check Supporting PnP and Power Management in Function Drivers might help you.

XNA Game networking on a host PC and a virtual one

I'm relatively new to c# and the XNA, but using several tutorials and books I succeed at creating a simple game. The problem is, that i have only one computer and i want to test the game's networking features. So i have installed VMware Workstation and created a Virtual PC running Windows 7 Professional x86. On my host PC I'm running Windows 7 x64. I bridged both PC's and now i can share files between them flawlessly. But unfortunately when i run my game on both of them, create a session on the first, it seems that the second can't find and join that session. I tried to run another games like Quake and the result was the same - it looked like both PC's don't see each other. I also tried with installing Hamachi on both machines - no result again.
So my question is - is it possible to run XNA game which uses Windows Live for creating and joining a session on a host PC and virtual one.
Thank you in advance :)
make sure to use bridged networking in VM settings.
you can then specify different IP's on host / guest.
Also, try to stick it with IPv6
If you're just trying to test networking features and not simulate lag you can run multiple clients on 1 computer.
You should be able to find the session just the same as if you were running over the net/Lan.
Note:
Personally I've only done networking with Lidgren's network library so I'm not sure if using XNA's built in library works the same but it could be worth a try.
Edit:
Thought it was worth mentioning if you're running in the editor it won't let you run multiple clients directly, so publish your game to a local folder and run from there. You can also run one from the editor to get any debug messages or exceptions that occur.

Resources